Toegang
- Standaard luistert InfluxDB 3 Core naar:
http://<SERVER_IP>:8181 - Zorg voor poort
8181/tcpis open bij toegang op afstand.
Authenticatie en tokens
- InfluxDB 3 Core maakt gebruik van tokengebaseerde authenticatie.
- Maak het admin-(operator)token:
influxdb3 create token --admin - Het token wordt slechts één keer getoond.
- Bewaar het veilig, het kan later niet meer worden opgehaald.
Belangrijke bestanden en mappen
- Configuratiebestand:
/etc/influxdb3/influxdb3-core.conf - Gegevensmap:
/var/lib/influxdb3/data - Plug-inmap:
/var/lib/influxdb3/plugins - Systeemservice:
influxdb3-core
Servicebeheer
Stop de dienst:
systemctl stop influxdb3-core
Start de dienst:
systemctl start influxdb3-core
Start de dienst opnieuw:
systemctl restart influxdb3-core
Controleer status:
systemctl status influxdb3-core
Logs bekijken:
journalctl -u influxdb3-core -f
Basisgebruik (CLI)
Toon beschikbare databases:
influxdb3 show databases --token <AUTH_TOKEN>
Gebruik de write commando 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'
Voer SQL-query's uit op uw database:
influxdb3 query
--database <DATABASE_NAME>
--token <AUTH_TOKEN>
"SELECT * FROM home ORDER BY time"