What data does nagiosgraph need from the plugin

nagios

I've been searching high and low for a good explanation of how I should return data from my custom Nagios plugin to make sure that Nagiosgraph will be able to parse it.

One place suggests the format "CPU Usage 98%|c[cpu]=98%;80;95;0;100", while other places suggests variations of this. However, my Nagios does not seem to understand the above format or any other I've tried.

I simply want to be able to draw a graph which plots data points (say, values between 0 and 100) onto a graph. Are there any good resources on this, or does anyone else have any basic examples for this?

Assume I've got two pieces of data : a label (connections) and a value (250). How do I return this to Nagios in a format which enables Nagios to graph this?

Note: I'm asking about 'nagiosgraph' and not 'nagiosgrapher'.

Best Answer

Everything after the pipe is irrelevant, as far as Nagios is concerned. It just stores it or passes is to your perfdata command(s). Perhaps your question is really about getting nagiosgraph to work?

Assuming you have nagiosgraph working, your custom plugin needs to follow the perfdata specifications.

See the Nagios Plugin Development Guidelines for an overview, and the Nagios Plugin API for very detailed information about perfdata specs.