MirrorNest
← Todos os guias

InfluxDB

A purpose-built time-series database for metrics and events — the standard backend for storing sensor readings, IoT telemetry, and infrastructure monitoring data at high write volume.

Destino: Any Docker hosttime-seriesmetricsDockerSite oficial ↗Documentação oficial ↗
Este guia foi elaborado a partir da documentação oficial do InfluxDB, ligada acima — verifique sempre lá os nomes exatos dos pacotes/versões antes de executar estes comandos num servidor de produção, uma vez que as versões da distribuição e do projeto mudam com o tempo.
  1. 1Run the official container

    docker run -d \ --name influxdb \ -p 8086:8086 \ -v ./influxdb/data:/var/lib/influxdb2 \ -v ./influxdb/config:/etc/influxdb2 \ --restart unless-stopped \ influxdb:2
  2. 2Complete the setup wizard

    The first visit walks through creating an admin user, an initial organization, and a bucket (InfluxDB's term for a named data retention policy/database).

    http://your-server-ip:8086
  3. 3Write and query data

    Data is written via the API/client libraries (or Telegraf as a collection agent) and queried with Flux or InfluxQL; Grafana is the most common way to visualize it.