Dashboard Pipeline Setup » History » Version 1

J. Wienke, 01/15/2015 01:53 PM

1 1 J. Wienke
h1. Visualizing Monitoring Results with InfluxDB and Grafana
2 1 J. Wienke
3 1 J. Wienke
h2. Installation of Required Software
4 1 J. Wienke
5 1 J. Wienke
# Install rsb, rst
6 1 J. Wienke
# Install rsb-performance-monitor
7 1 J. Wienke
# Install rsb-performance-monitor-graphite-adapter (git in this project)
8 1 J. Wienke
# Install InfluxDB (ideally just use the DEB archive or citk)
9 1 J. Wienke
# Install grafana (just extract the pre-built archive somewhere, or citk)
10 1 J. Wienke
# Install elasticsearch (Optionally, used to store dashboard configurations server-side. Client-side storing is also possible. Install binary archive, e.g. from citk)
11 1 J. Wienke
12 1 J. Wienke
h2. Configuration
13 1 J. Wienke
14 1 J. Wienke
# Configure InfluxDB as desired. A config file which uses just a local computer and /tmp for data is attached. Please note that in this file the @assets@ line in the @admin@ section needs to be fixed so that it point to the installation of the required files for the admin web interface.
15 1 J. Wienke
# Configure grafana to operate with this instance of InfluxDB. A sample configuration file is attached.
16 1 J. Wienke
17 1 J. Wienke
Please note that everyone calling the grafana web page in his browser later on needs to be able to communicate directly with the running InfluxDB instance since all plotting is performed client-side via JS.
18 1 J. Wienke
19 1 J. Wienke
h2. Startup
20 1 J. Wienke
21 1 J. Wienke
# Start InfluxDB, e.g. with
22 1 J. Wienke
  <pre>$prefix/opt/influxdb/influxdb -config=$prefix/etc/vdemo_scripts/data/influxdb-config-tmp.toml</pre>
23 1 J. Wienke
# Ensure that a database exists inside the running DB. In this case, we will call it @data@
24 1 J. Wienke
  <pre>curl -X POST 'http://localhost:8086/db?u=root&p=root' -d '{"name": "data"}'</pre>
25 1 J. Wienke
# Start some rsb-performace-monitor instances, assuming that monitoring results will be published on @/monitoring@ and @/host@
26 1 J. Wienke
# Start rsb-performance-monitor-graphite-adapter with the InfluxDB backend
27 1 J. Wienke
  <pre>$prefix/bin/rsbperfmon-graphite -d -b influxdb -a</pre>
28 1 J. Wienke
  Assumes that InfluxDB runs on localhost with port 8086 and root:root as credentials. If not, provide the required arguments. @-d@ pre-calculates derivatives of some values for better visualization purposes later on, @-a@ aggregates all subprocesses into the results of a single monitored process since most of the time only the cumulative results of a functional component are interesting.
29 1 J. Wienke
# Start a webserver to server the static grafana files, e.g.:
30 1 J. Wienke
  <pre> cd $prefix/opt/grafana && python2 -m SimpleHTTPServer 8020</pre>
31 1 J. Wienke
# Optionally, start an elasticsearch server
32 1 J. Wienke
  <pre>$prefix/opt/elasticsearch/bin/elasticsearch -Des.path.data=$HOME/.elasticsearch</pre>
33 1 J. Wienke
  Chose an appropriate data path
34 1 J. Wienke
35 1 J. Wienke
h2. Notes
36 1 J. Wienke
37 1 J. Wienke
* Use meaningful credentials instead of root:root