User Tools

Site Tools


communitycloud:services:monitoring:grafana-influxdb

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
communitycloud:services:monitoring:grafana-influxdb [2017/04/28 15:14]
tkilla created
communitycloud:services:monitoring:grafana-influxdb [2017/04/28 16:10] (current)
tkilla
Line 1: Line 1:
 ====== Grafana-InfluxDB ====== ====== Grafana-InfluxDB ======
  
-.. is a very good combination to montior various sources.+.. is a very good combination to monitor various sources.
  
 ===== Grafana Setup ===== ===== Grafana Setup =====
Line 34: Line 34:
  
  
 +http://docs.grafana.org/installation/debian/
  
  
 +===== InfluxDB Setup =====
 +
 +**Installation**
 +
 +https://docs.influxdata.com/influxdb/v0.9/introduction/installation/
 +
 +**Authentication**
 +
 +Setup users in influx -cli:
 +
 +Admin:
 +  CREATE USER admin WITH PASSWORD 'xxxxxxxxxxxx' WITH ALL PRIVILEGES
 +
 +Normal User for logging:
 +  CREATE USER logger WITH PASSWORD 'yyyyyyyyyyyyyyyyyyyy'
 +  GRANT ALL ON "stats" TO logger
 +  GRANT ALL ON "_internal" TO logger
 +  GRANT ALL ON "opentsdb" TO logger
 +
 +
 +At last enable auth in /etc/influxdb/influxdb.conf  Config:
 +
 +  auth-enabled = true
 +
 +Restart influxdb and login to the cli via:
 +
 +  influx -username 'admin' -password 'xxxxxxxxxxxx'  -ssl -unsafeSsl
 +
 +
 +**Setup Basic Auth in Grafana Datasources**
 +
 +https://docs.influxdata.com/influxdb/v0.9/administration/authentication_and_authorization/
 +
 +**httpS**
 +
 +With a self-signed Cert you get crypto, but no verification of the host. Anyway:
 +
 +  openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/ssl/influxdb-selfsigned.key -out /etc/ssl/influxdb-selfsigned.crt -days 99999
 +  
 +/etc/influxdb/influxdb.conf :
 +
 +  https-enabled = true
 +  https-certificate = "/etc/ssl/influxdb-selfsigned.crt"
 +  https-private-key = "/etc/ssl/influxdb-selfsigned.key"
 +
 +Change the Datasource URLs in Grafana to use httpS and check "With CA Cert"
 +
 +https://docs.influxdata.com/influxdb/v1.2/administration/https_setup/#step-1-generate-a-self-signed-certificate
 +
 +
 +
 +
 +===== Telegraf Setup =====
 +
 +Telegraf is a superb logging system with a loooot of plugins. It can write directly to influxdb via http(s)
 +
 +**Installation**
 +
 +With the InfluxDB repos you can install it directly via deb packages:
 +
 +https://docs.influxdata.com/telegraf/v0.13/introduction/installation/
 +
 +
 +**Configuration**
 +
 +Setup InfluxDB Connection in /etc/telegraf/telegraf.conf:
 +
 +  [[outputs.influxdb]]
 +     urls = ["http://192.168.1.1:8086"]
 +     database = "stats"
 +
 +     username = "logger"
 +     password = "yyyyyyyyyyyyyyyyyyyy"
 +
 +**httpS**
 +
 +Change the URLs to httpS://..
 +
 +For self-signed certs add:
 +
 +  insecure_skip_verify = true
 +
 +https://github.com/influxdata/telegraf
  
  
  
communitycloud/services/monitoring/grafana-influxdb.1493385272.txt.gz ยท Last modified: 2017/04/28 15:14 by tkilla