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 ] ];
[cid:[email protected]]
Is there something after the map has been processed that takes that value and
produces the graphs where the calculation is going wrong?
This is a really annoying issue that I would like to resolve if I can.
Cheers
James
From: James Osbourn
Sent: 15 December 2012 16:16
To: Nagios Users List
Subject: RE: [Nagios-users] Nagios Graph converting figures to binary bytes
rather than decimal
Hi Claudio,
Thanks for the feedback. Just to make sure, where abouts in the map file
should these lines go?
Thanks
James
From: Claudio Kuenzler [mailto:[email protected]]
Sent: 15 December 2012 15:59
To: Nagios Users List
Subject: Re: [Nagios-users] Nagios Graph converting figures to binary bytes
rather than decimal
Hi James,
Looking at the GB value and converting to bytes and then back to GB using
decimal bytes gives these figures.
Is there any way to make nagiosgraph using binary bytes rather than decimal. I
am not that familiar with nagiosgraph or RRD and cannot work out how to make
the change.
You will have to manually add an entry into the 'map' file to tell nagiosgraph
to use different values.
My system (df -h) shows:
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg0-root 20G 5.4G 14G 29% /
Nagiosgraph shows:
total: 20.32G
used: 5.45G
You can use the following map entry:
# Service Type: check_disk
# Nagiosgraph regex by Claudio Kuenzler
# Check: /usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /
# Output: DISK OK - free space: / 235120 MB (66% inode=95%):
# Perfdata: /=119211MB;298635;335964;0;373294
/perfdata:(.*)=(\d+)MB;(\d+);(\d+);(\d+);(\d+).*/
#/perfdata:(\W)=(\d+)MB;(\d+);(\d+);(\d+);(\d+).*/ # only / partition
and push @s, [diskusage,
['used', GAUGE, $2*1000**2 ],
['total', GAUGE, $6*1000**2 ] ];
<<inline: image001.png>>
------------------------------------------------------------------------------ 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
_______________________________________________ Nagios-users mailing list [email protected] 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
