User Tools

Site Tools


Sidebar






newpage

communitycloud:services:monitoring:grafana-influxdb

This is an old revision of the document!


Grafana-InfluxDB

.. is a very good combination to monitor various sources.

Grafana Setup

Installation

/etc/apt/sources.list

deb https://packagecloud.io/grafana/stable/debian/ jessie main
curl https://packagecloud.io/gpg.key | sudo apt-key add -
apt-get update
apt-get install grafana

Configure in /etc/grafana/grafana.ini

; set a domain
domain = monitor.xsxss.com
; disable usage reports!
reporting_enabled = false
; and connection to gravatar service
disable_gravatar = true

Setup a Database or use sqlite

Apache Proxy-Pass

To reach a grafana running on port 3000 just set a ProxyPass in an Apache VHost (ideally via httpS):

ProxyPass / http://192.168.1.1:3000/

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 Config:

auth-enabled = true

Restart influxdb and login to the cli via:

influx -username 'admin' -password 'xxxxxxxxxxxx'

Setup Basic Auth in Grafana Datasources

https://docs.influxdata.com/influxdb/v0.9/administration/authentication_and_authorization/

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://github.com/influxdata/telegraf

communitycloud/services/monitoring/grafana-influxdb.1493387806.txt.gz · Last modified: 2017/04/28 15:56 by tkilla