InfluxDB: Unterschied zwischen den Versionen

Aus Hackerspace Ffm
Wechseln zu: Navigation, Suche
(Konfigurieren)
Zeile 33: Zeile 33:
 
Testen ob es geht
 
Testen ob es geht
 
   influx -username grafana -password <passwort> -host localhost
 
   influx -username grafana -password <passwort> -host localhost
 +
  use openhab_db

Version vom 20. Juli 2018, 20:39 Uhr

Installation

 curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
 echo "deb https://repos.influxdata.com/debian stretch stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
 sudo apt update
 sudo apt install influxdb telegraf
 sudo systemctl enable influxdb
 sudo systemctl start influxdb

Konfigurieren

 influx
 
 > CREATE DATABASE openhab_db
 > CREATE USER admin WITH PASSWORD '<passwort>' WITH ALL PRIVILEGES
 > CREATE USER openhab WITH PASSWORD '<passwort>'
 > CREATE USER grafana WITH PASSWORD '<passwort>'
 > GRANT ALL ON openhab_db TO openhab
 > GRANT READ ON openhab_db TO grafana
 > exit

Authentifizierung für http in Konfigurationsdatei /etc/influxdb/influxdb.conf eintragen

 [http]  
 enabled = true  
 bind-address = ":8086"
 auth-enabled = true

Service neu starten

 sudo systemctl restart influxdb.service

Testen ob es geht

 influx -username grafana -password <passwort> -host localhost
 use openhab_db