James and I continued the troubleshooting off-list and we came to the solution, which we want to share of course. <br>Here's more or less my mail:<br><br>---------------------------------------<br><br>You're absolutely right, the graphs were not correct. With both *1000**2 and *1024**2. <br>
<br>Actually, thanks to your e-mail I figured that in the past years I've 
lived in denial. I must have come up with the multiplication of 1000 in 
the map file as a kind of workaround, because the graph was closer to 
the actual reality. Then I must have forgotten that and went on.... <br><br>I broke it down to this:<br><br><span style="font-family:courier new,monospace"># df<div class="im"><br>Filesystem      Size               Used              Avail             Use% Mounted on<br>
</div>
/dev/md4         682587992     117456312     530731228      19% /<br><br># df -h<div class="im"><br>Filesystem      Size            Used          Avail          Use% Mounted on<br></div>/dev/md4         651G          113G          507G          19% /</span><br>

<br>So df shows a value in KB (682587992). <br><br>The Nagios plugin itself takes this value and presents it in MB (666589):<br><br><span style="font-family:courier new,monospace">/=114709MB;533271;599930;0;666589</span><br>

<br>So in order to present Nagiosgraph the values, we have to go down to the lowest level, which in this case is Byte. <br>To get Byte value from the Nagios output we have to multiply it with 1024^2: 666589*1024*1024 = 698969227264<br>

<br>The job of Nagiosgraph is now to take this 698969227264 value and 
divide it so often through 1024 until a "reasonable" and human readable 
value is given, which would be the 651 GB. <br><br>But here's the problem: Nagiosgraph divides 698969227264 through 1000 instead of 1024, showing the graph at 698 GB. <br>
But why? It took me some guesses which I had to confirm but: Nagiosgraph
 BY DEFAULT divides through 1000. Probably because the initial reason 
for rrd graphs was the graphing of network connections which are usually
 in bits. Anyhow we need to tell Nagiosgraph to divide through 1024 for 
our disk checks. <br>
There's a special file for that called <b>rrdopts.conf</b>. I added the following lines to it:<br><br><span style="font-family:courier new,monospace"># disk values need to be divided by 1024 not 1000<br>Diskspace /=-b 1024<br>

Root Partition=-b 1024</span><br><br>The string left defines the service
 description in Nagios. So in my case this is "Diskspace /". -b 1024 
tells Nagiosgraph to take 1024 as a base value.<br>See the following entry from the "rrdgraph" manpage:<br>
<p>[<b>-b</b>|<b>--base</b> <i>value</i>] If you are graphing memory (and <small>NOT</small> network traffic) this switch should be set to 1024 so that one Kb is 1024 byte. For traffic measurement,
1 kb/s is 1000 b/s. <br></p><p>Now you just have to make sure, that rrdopts.conf is not commented in your nagiosgraph.conf file and there you go. <br></p>Positive
 thing is that there is no need to recreate the rrd files. This rrd 
option is only for viewing/drawing the graphs. Which means that the 
correct values are shown immediately. <br><br><br><br><div class="gmail_quote">On Tue, Dec 18, 2012 at 2:51 PM, James Osbourn <span dir="ltr"><<a href="mailto:james.osbourn@citrix.com" target="_blank">james.osbourn@citrix.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="blue" vlink="purple" lang="EN-GB"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Claudio,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">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<u></u><u></u></span></p>
<p class="MsoNormal"><img src="" width="689" height="252"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">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.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I cannot work out why the graph is showing the wrong values when all other information is correct.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">James<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="EN-US">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="EN-US"> Claudio Kuenzler [mailto:<a href="mailto:ck@claudiokuenzler.com" target="_blank">ck@claudiokuenzler.com</a>] <br>
<b>Sent:</b> 18 December 2012 12:15</span></p><div class="im"><br><b>To:</b> Nagios Users List<br><b>Subject:</b> Re: [Nagios-users] Nagios Graph converting figures to binary bytes rather than decimal<u></u><u></u></div><p>
</p></div></div><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><div><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Claudio,</span><u></u><u></u></p><div><div class="h5"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">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.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New";color:#1f497d">/perfdata:(.*)=(\d+)MB;(\d+);(\d+);(\d+);(\d+)/</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New";color:#1f497d">and push @s, [$1,</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New";color:#1f497d">        ['data', GAUGE, $2*1024*1024 ],</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New";color:#1f497d">        ['warn', GAUGE, $3*1024*1024 ],</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New";color:#1f497d">        ['crit', GAUGE, $4*1024*1024 ],</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New";color:#1f497d">        ['min', GAUGE, $5*1024*1024 ],</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New";color:#1f497d">        ['max', GAUGE, $6*1024*1024 ] ];</span><u></u><u></u></p>
</div></div></div></div></blockquote></div><div><div class="h5"><p class="MsoNormal"><br>You didn't follow my example, as you're again multiplying with 1024.<br><br>Take _another_ look at my example:<br><br>        ['used', GAUGE, $2*1000**2 ],<br>
        ['total', GAUGE, $6*1000**2 ] ];<u></u><u></u></p></div></div></div></div></div><br>------------------------------------------------------------------------------<br>
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial<br>
Remotely access PCs and mobile devices and provide instant support<br>
Improve your efficiency, and focus on delivering more value-add services<br>
Discover what IT Professionals Know. Rescue delivers<br>
<a href="http://p.sf.net/sfu/logmein_12329d2d" target="_blank">http://p.sf.net/sfu/logmein_12329d2d</a><br>_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br></blockquote></div><br>