Toegang
- Standaard luistert InfluxDB 3 Core op:
http://<SERVER_IP>:8181 - Poort beveiligen
8181/tcpis open als je op afstand toegang wilt.
Verificatie & Tokens
- InfluxDB 3 Core gebruikt tokengebaseerde authenticatie.
- Maak het admin (operator) token aan:
influxdb3 create token --admin - Het token wordt slechts één keer getoond.
- Bewaar het veilig, het kan later niet worden opgevraagd.
Belangrijke bestanden en mappen
- Configuratiebestand:
/etc/influxdb3/influxdb3-core.conf - Gegevensmap:
/var/lib/influxdb3/data - Pluginmap:
/var/lib/influxdb3/plugins - Systemd-service:
influxdb3-core
Servicebeheer
Stop de service:
systemctl stop influxdb3-core
Start de service:
systemctl start influxdb3-core
Herstart de service:
systemctl restart influxdb3-core
Status controleren:
systemctl status influxdb3-core
Logs weergeven:
journalctl -u influxdb3-core -f
Basisgebruik (CLI)
Beschikbare databases weergeven:
influxdb3 show databases --token <AUTH_TOKEN>
Gebruik de write Opdracht om gegevens in te voegen:
influxdb3 write
--database <DATABASE_NAME>
--token <AUTH_TOKEN>
--precision s
'home,room=Living Room temp=21.1,hum=35.9,co=0i 1641024000
home,room=Kitchen temp=21.0,hum=35.9,co=0i 1641024000
home,room=Living Room temp=21.4,hum=35.9,co=0i 1641027600
home,room=Kitchen temp=23.0,hum=36.2,co=0i 1641027600
home,room=Living Room temp=21.8,hum=36.0,co=0i 1641031200
home,room=Kitchen temp=22.7,hum=36.1,co=0i 1641031200'
SQL-query's uitvoeren op je database:
influxdb3 query
--database <DATABASE_NAME>
--token <AUTH_TOKEN>
"SELECT * FROM home ORDER BY time"