Hi All,
I'm new to developing nagios plugins, have recently created my first one (http://exchange.nagios.org/directory/Pl ... rs/details) and now I'm trying to add graph functionality to it.
After adding perf data to my script output and creating an entry on the nagiosgraph map file I now have a graph, my problem is this is not absolute (not sure that's the correct term), I'll try to clarify it.
The plugin collects the number of current listeners on a shoutcast server, so it will return a "whole number" (1, 5, 9, etc...) but for some reason the graphs are been built with decimal values inside it. I'm new to RRD as well but I'm there's some setting on the rrd file that can change this.
I've attached a screenshoot where you can see the values are decimals, you can see the CUR value is 2.78 how can I have 2.78 listeners?
All I want is for the graph to show "whole numbers" ONLY.
Let me know if you need to see any more details on this, any help is much appreciated.
Regards
Kadu
Absolute graphs?
Absolute graphs?
- Attachments
-
- Listeners graph
- gkrellShoot_2010-12-14_172439.jpg (27.84 KiB) Viewed 2074 times
Re: Absolute graphs?
I'm not a pro with PNP, but my guess would be that if you need whole numbers (integers) on your graph, make sure all of your units of measurement in the performance data are using integers. In strongly typed programming languages you have you change integers to floating (decimal) numbers in order to use them together. I think PNP makes mention of number/data types on their developer guidelines, I would check their website for more detailed documentation.
Cool plugin idea by the way ; )
Cool plugin idea by the way ; )
Re: Absolute graphs?
Thanks for your response,
Unfortunately not entirely sure what you mean here. What does PNP stands for?
As far as my plugin goes it always return a whole number in the perf data
SHOUTCAST OK - 5 out of 100 listeners on port 8128 | Listeners=5;100
Kadu
Unfortunately not entirely sure what you mean here. What does PNP stands for?
As far as my plugin goes it always return a whole number in the perf data
SHOUTCAST OK - 5 out of 100 listeners on port 8128 | Listeners=5;100
Kadu