wiki'd

by JoKeru

For your stats / metrics: InfluxDB and Grafana

Need a quick way to visualize statistics or custom metrics ?
You like nice graphs - Kibana style ?

Grafana is the answer (the presentation layer).
And InfluxDB is the assistant for the job (the database storing the metrics).

\# http://influxdb.com/docs/v0.8/introduction/installation.html  
\$ wget http://s3.amazonaws.com/influxdb/influxdb\_latest\_amd64.deb  
\$ dpkg -i influxdb\_latest\_amd64.deb  
\$ vi /opt/influxdb/versions/0.8.8/config.toml \# change parameters if
needed  
\$ /etc/init.d/influxdb start

\# http://grafana.org/download/  
\$ cd /var/www/ \# a working http server is needed  
\$ wget http://grafanarel.s3.amazonaws.com/grafana-1.9.1.tar.gz  
\$ tar -vxzf grafana-1.9.1.tar.gz  
\$ cd grafana-1.9.1/  
\$ cp config.sample.js config.js  
\$ vi config.js \# uncomment the InfluxDB section and adapt it to your
setup

\# create the databases  
\$ curl -s "http://localhost:8086/db?u=root&p=root" -d "{\\"name\\":
\\"grafana\\"}"  
\$ curl -s "http://localhost:8086/db?u=root&p=root" -d "{\\"name\\":
\\"metrics\\"}"  
\# put some data in  
\$ curl -X POST -d
'[{"name":"random","columns":["value"],"points":[[20]]}]'
'http://localhost:8086/db/metrics/series?u=root&p=root'  
\$ curl -X POST -d
'[{"name":"random","columns":["value"],"points":[[10]]}]'
'http://localhost:8086/db/metrics/series?u=root&p=root'  
\$ curl -X POST -d
'[{"name":"random","columns":["value"],"points":[[30]]}]'
'http://localhost:8086/db/metrics/series?u=root&p=root'  

Now open the Grafana url, edit the Graph and put "random" in the series field - you should see a line having 3 points at 20, 10 and 30.

http://www.philipotoole.com/influxdb-and-grafana-howto/

http://www.kibinlabs.com/influxdb-continuous-queries-and-retention-policies/

http://www.rittmanmead.com/2015/02/obiee-monitoring-and-diagnostics-with-influxdb-and-grafana/

Comments