I've heard stories of people being employed solely to look at graphs.
This is all good stuff, but the point of this post is to show how you can get the data in the first place from your Nagios plugin scripts.
The problem with the graph (storage template) is that the x-axis shows the disk space used rather than the total size of the disk, for example: The check that is producing this data is effectively: ) but I don't know how to tweak the graph to use this as the y-axis scale.
Centreon is a great front-end for Nagios, the well known monitoring tool.
This script implements Performance Data as described by Nagios, which is very short means that besides outputting readable data, it also outputs performance data after the pipe ("|") mark, separated by a comma.
This is defined in the glorious Nagios Plugin Development Guidelines For those who dislike the size 8 font of the dev guide I'll paste the details here.
Essentially whereas before we ran our plugin and it printed OK to the screen, we're now going to add a pipe character after that and then some text in the following format..
Think of this post as a follow-on from Beautiful Nagios Scripts Last time we wrote a plugin that did the same thing as check_http.
This time we'll take that same script and make it output something called 'performance data'.