Installing RRDtool
Before proceeding, see the 'installing rrd tools' document.
Panoptes and RRD
The only current mechanism for visualizing data in panoptes is using RRD. I have been working on a prototype to do client-side visualization from SQLite using the 'Processing' language, but that is low on my list of priorities at the moment.
The primary mechanism for storing data in RRD is by using the RRD action (Panoptes::Rules::Action::RRD). The sequence is that one of the monitors will observe some event (e.g. current system load) and generate a message which is directed to the rules system. A rule can then be configured to capture the raw data from the message, store it in an RRD, and generate the graph(s).
Here is an example rule that will look for any message generated by the ping monitor for the host 'geekfarm' and generate an RRD graph.
---
condition:
plugin: Panoptes-Monitor-Ping
matches:
hostname: geekfarm
action:
rrd:
rrd_name: ping_geekfarm
rrd_schema:
average: GAUGE
loss: GAUGE
graph_options:
title: geekfarm ping time
vertical_label: ms
sources:
- average
- loss
If the RRD file does not exist, it will automatically be created when the action is called.
All RRD files and graphs will be stored in ~/.panoptes/rrd.
Here is a slightly more elaborate example that specifies a lot of additional graph options which get passed to RRD::Simple. This is the rule I use to graph my idle times using the OsxIdle plugin.
---
condition:
plugin: Panoptes-Monitor-IdleOSX
action:
rrd:
rrd_name: idle
rrd_schema:
idle_min: GAUGE
active_min: GAUGE
graph_options:
title: idle/active
vertical_label: minutes
upper_limit: 60
lower_limit: 0
rigid: ''
sources:
- active_min
- idle_min
source_drawtypes:
- AREA
- AREA
source_colors:
- 8500FFCC
- FF8500CC
width: 1100
color:
- BACK#6F6F6F
- CANVAS#3F3F3F
- SHADEA#000000
- SHADEB#000000
- ARROW#61B51B
- GRID#00FFFF
- MGRID#FF00FF
- FONT#000000
- AXIS#FF00FF
- FRAME#000000
periods:
- day
- week
- month
Current Limitations
Only one RRD file can be specified for each action. So, if your rule matches more than one message (e.g. the ping times from more than one host), your RRD won't track them separately and will thus get filled with garbage.
Only raw message data can be inserted into the graph. In the future there will be mechanisms to insert aggregated message data (e.g. the counts of matching messages or average values within rolling time windows).
The graphs are regenerated every time a matching message is received. So it is assumed that a matching message will be generated at regular intervals (e.g. every 1 minute or every 15 minutes).