Dashboard Pipeline Setup » History » Version 9

J. Wienke, 06/29/2015 10:42 AM

1 3 J. Wienke
h1. Dashboard Pipeline Setup
2 3 J. Wienke
3 3 J. Wienke
{{>toc}}
4 1 J. Wienke
5 4 J. Wienke
h2. Deployment Decisions
6 4 J. Wienke
7 4 J. Wienke
There are currently two supported backends for storing timeseries data which can be visualized by the grafana dashboard:
8 4 J. Wienke
# "InfluxDB":https://influxdb.com/: More modern timeseries database with well-structured query language
9 4 J. Wienke
# "Graphite":https://graphite.readthedocs.org/en/latest/: Well-known monitoring database and web-frontend. Less structured query language and harder to deploy
10 4 J. Wienke
11 4 J. Wienke
While InfluxDB provides the much more modern experience and is easier to administer, graphite currently provides better performance with less CPU impact and better control of automatic retention. Depending on your needs, decide on one of the solutions.
12 4 J. Wienke
13 1 J. Wienke
h2. Installation of Required Software
14 1 J. Wienke
15 1 J. Wienke
# Install rsb, rst
16 1 J. Wienke
# Install rsb-performance-monitor
17 1 J. Wienke
# Install rsb-performance-monitor-graphite-adapter (git in this project)
18 5 J. Wienke
# Install a timeseries database:
19 5 J. Wienke
#* InfluxDB: version 0.8! as DEB archive or citk
20 5 J. Wienke
#* Graphite: See https://graphite.readthedocs.org/en/latest/install.html or citk
21 5 J. Wienke
# Install grafana version 2 (just extract the pre-built archive somewhere, or citk)
22 1 J. Wienke
23 5 J. Wienke
h2. Backend Configuration
24 1 J. Wienke
25 5 J. Wienke
For both backend solutions you need to decide on a retention policy, that means how long data will be kept in the database.  This decides on the storage requirements of your database files and the possibility to scroll back in time in the dashboard.
26 1 J. Wienke
27 5 J. Wienke
h3. InfluxDB
28 5 J. Wienke
29 5 J. Wienke
# Configure InfluxDB as desired using the example config files and the instructions found here: https://influxdb.com/docs/v0.8/introduction/installation.html. 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.
30 7 J. Wienke
# Start the database server, e.g. using
31 7 J. Wienke
  <pre>
32 7 J. Wienke
$prefix/opt/influxdb/influxdb -config=$prefix/etc/vdemo_scripts/data/influxdb-config-tmp.toml
33 8 J. Wienke
</pre>
34 5 J. Wienke
# Using the web interface (http://host:8083 per default), create a database for the monitoring data. The retention for the proposed default shard space should be set to the desired time you plan to keep data available in the database (E.g. 7d). Duration should probably be set to 1d.
35 1 J. Wienke
36 9 J. Wienke
h3. Graphite
37 9 J. Wienke
38 9 J. Wienke
Unfortunately, graphite configuration is a bit harder than for InfluxDB. Basically, you need to follow the instructions given here: https://graphite.readthedocs.org/en/latest/install.html#initial-configuration. The steps are:
39 9 J. Wienke
# Configure the carbon daemon, which accepts new data via HTTP and pushes them into the timeseries database.
40 9 J. Wienke
## Create a @carbon.conf@ file and adapt as required. The comments about all data directories decending from @STORAGE_DIR@ are misleading. This is only true for the defaults. In case you want to move your data, you need to set all of these directories explicitly. An exemplary configuration is attached: attachment:carbon.conf. The file needs to be placed in the @conf@ directory of your installation root.
41 9 J. Wienke
## Create a @storage-schemas.conf@ file which defines the retention policies. The highest resolution needs to be >= the intended reporting speed of data. Otherwise you will end up with null values in the database. An example is attached: attachment: storage-schemas.conf. The file needs to be placed in the @conf@ directory of your installation root.
42 9 J. Wienke
43 1 J. Wienke
h2. Startup
44 1 J. Wienke
45 1 J. Wienke
# Start InfluxDB, e.g. with
46 1 J. Wienke
  <pre>$prefix/opt/influxdb/influxdb -config=$prefix/etc/vdemo_scripts/data/influxdb-config-tmp.toml</pre>
47 1 J. Wienke
# Ensure that a database exists inside the running DB. In this case, we will call it @data@
48 1 J. Wienke
  <pre>curl -X POST 'http://localhost:8086/db?u=root&p=root' -d '{"name": "data"}'</pre>
49 1 J. Wienke
# Start some rsb-performace-monitor instances, assuming that monitoring results will be published on @/monitoring@ and @/host@
50 1 J. Wienke
# Start rsb-performance-monitor-graphite-adapter with the InfluxDB backend
51 1 J. Wienke
  <pre>$prefix/bin/rsbperfmon-graphite -d -b influxdb -a</pre>
52 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.
53 1 J. Wienke
# Start a webserver to server the static grafana files, e.g.:
54 1 J. Wienke
  <pre> cd $prefix/opt/grafana && python2 -m SimpleHTTPServer 8020</pre>
55 1 J. Wienke
# Optionally, start an elasticsearch server
56 1 J. Wienke
  <pre>$prefix/opt/elasticsearch/bin/elasticsearch -Des.path.data=$HOME/.elasticsearch</pre>
57 1 J. Wienke
  Chose an appropriate data path
58 1 J. Wienke
59 2 J. Wienke
h2. Usage
60 2 J. Wienke
61 2 J. Wienke
# Open the grafana webpage at http://localhost:8020
62 2 J. Wienke
# Configure the dashboard as needed
63 2 J. Wienke
# Save the dashboard, either to elasticsearch or to your browser
64 2 J. Wienke
65 1 J. Wienke
h2. Notes
66 1 J. Wienke
67 1 J. Wienke
* Use meaningful credentials instead of root:root