Nagios Graph converting figures to binary bytes rather than decimal

James Osbourn james.osbourn at citrix.com
Tue Dec 18 14:51:46 CET 2012


Hi Claudio,

I modified your code as it was not working for me and wanted to check what was going on.  I have reverted back to using the example that you have given and I am still getting the same result as can be seen here
[cid:image001.png at 01CDDD26.57B72AD0]
The filesystem is only 450GB in size, yet the graph values are still showing 460.80, which is the byte value show in decimal GB.

I cannot work out why the graph is showing the wrong values when all other information is correct.

James

From: Claudio Kuenzler [mailto:ck at claudiokuenzler.com]
Sent: 18 December 2012 12:15
To: Nagios Users List
Subject: Re: [Nagios-users] Nagios Graph converting figures to binary bytes rather than decimal


Hi Claudio,

I have entered the map entry below based on your example and I am still seeing the results on the graph show as a decimal version of the Bytes value.

/perfdata:(.*)=(\d+)MB;(\d+);(\d+);(\d+);(\d+)/
and push @s, [$1,
        ['data', GAUGE, $2*1024*1024 ],
        ['warn', GAUGE, $3*1024*1024 ],
        ['crit', GAUGE, $4*1024*1024 ],
        ['min', GAUGE, $5*1024*1024 ],
        ['max', GAUGE, $6*1024*1024 ] ];

You didn't follow my example, as you're again multiplying with 1024.

Take _another_ look at my example:

        ['used', GAUGE, $2*1000**2 ],
        ['total', GAUGE, $6*1000**2 ] ];
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20121218/713ff6c1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 16703 bytes
Desc: image001.png
URL: <https://www.monitoring-lists.org/archive/users/attachments/20121218/713ff6c1/attachment.png>
-------------- next part --------------
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list