Page 1 of 1

Custom Plugin Output - Performance data

Posted: Sat Feb 18, 2012 1:04 am
by douglagm
Hi,

I have written a custom plugin to monitor a service, but I am having a issue with the performance data. When I graph the information in nagiosgraph it displays the labels with ",data" behind it, I have attached an example.

According to http://nagiosplug.sourceforge.net/devel ... tml#AEN201, the performance data must be in the following format: 'label'=value[UOM];[warn];[crit];[min];[max], I believe my output is in that format.

According to http://nagios.sourceforge.net/docs/3_0/pluginapi.html, performance data must be separated by "|", mine is. There is also an example of how the performance data must look "$SERVICEPERFDATA$ /=2643MB;5948;5958;0;5968 /boot=68MB;88;93;0;98 /home=69357MB;253404;253409;0;253414 /var/log=818MB;970;975;0;980", again I believe my output follows that example.

The output of my plugin looks like this "Threads OK - Idle Theads: 8;|Idle Threads=8 Total Threads=33 Peak Threads=53"

So in summary, the plugin works perfectly, it is just the labels in nagiosgraph that I have an issue with "Label,data", see attachment.

The standard plugins display correctly.

Any help will be greatly appreciated.
Thanks
Gregg

Re: Custom Plugin Output - Performance data

Posted: Mon Feb 20, 2012 12:58 pm
by agriffin
Try surrounding your labels in single quotes, see if that helps. For example:

Code: Select all

Threads OK - Idle Theads: 8;|'Idle Threads'=8 'Total Threads'=33 'Peak Threads'=53
Although it seems to be handling the spaces correctly, the guidelines state that the quotes are required if you have spaces in the label, so it may still be causing issues somewhere.

Re: Custom Plugin Output - Performance data

Posted: Tue Feb 21, 2012 7:09 am
by douglagm
Thank-you for the response, I am afraid it did not work.
Just to make sure I removed "threads" from the output, that also didn't make any difference.

Re: Custom Plugin Output - Performance data

Posted: Wed Feb 22, 2012 12:12 pm
by agriffin
I'm not really sure what the issue might be. You may want to ask on the nagiosgraph forum to see if the developers there have a better answer for you.