Performance graph : Unit error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
cefi
Posts: 6
Joined: Mon Jun 13, 2011 8:52 am

Performance graph : Unit error

Post by cefi »

Hello,,
i currently got the same issue as described in these two topics :
http://support.nagios.com/forum/viewtop ... 291&p=5480
http://support.nagios.com/forum/viewtop ... 626&p=6876

I'd like to know if this issue is corrected in the 2011 version ?

My customer currently uses the 2009R1.4B version and the bug is still present in this version.

Regards,
Olivier Martin
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Performance graph : Unit error

Post by mguthrie »

We did upgrade the PNP script that processes performance data in R2011, but I don't know specifically all of the bug fixes that are present in the new script. You could check the changelog for PNP, or set up a demo test box with 2011 to know for sure.

http://docs.pnp4nagios.org/pnp-0.6/dwnld#changelog
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Performance graph : Unit error

Post by mguthrie »

Actually I just realized that those graphs are generated by mrtg, not PNP, so my guess is that issue will still persist in 2011.
cefi
Posts: 6
Joined: Mon Jun 13, 2011 8:52 am

Re: Performance graph : Unit error

Post by cefi »

Hello,

I made a test in our lab and the problem is still present with the lastest 2011 release.

It seems to come from the template used to create the graphs.
In my opinion, the mistakes are in the GPRINT value.
For example here is what we got after the installation in the template /usr/local/nagios/share/pnp/templates/check_xi_service_mrtgtraf.php :
$def[1] .= "GPRINT:var1:LAST:\"%7.2lf %Sb/s last\" " ;

We can see that we'll always got at least b/s, and not the unit used in the xml file created by PNP (located in /usr/local/nagios/share/perfdata/).
So I believe we should have this in the template :
$def[1] .= "GPRINT:var1:LAST:\"%7.2lf %S$UNIT[1] last\" " ;

This is an example as we have another DS and others stuff printed.

Now, I really got the real unit that is displayed.
My lab is limited at a 1Mb/s rate, so i am unable to test it with higher rates so i can't confirm that the problem is really located here.

Can you please let me know what you think about this ?

Regards.
Olivier Martin
NagiosXI 2009R1.4B
installed from vmware image.
No extras (gnome...)
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Performance graph : Unit error

Post by nscott »

cefi,

That is an interesting approach to a solution.

I'm working on updating the version of MRTG distributed with NagiosXI, which solved the graphing issues for me. I will keep your solution in mind.
Nicholas Scott
Former Nagios employee
cefi
Posts: 6
Joined: Mon Jun 13, 2011 8:52 am

Re: Performance graph : Unit error

Post by cefi »

Hello,

this is a great news also from you.

Do you have an idea when a patched version of XI would be available ?

I'm asking you because my customer is creating reports from the performance graphs. These graphs are send to customers so he needs a solution quick.

In the meantime, is it possible to have a document on how you did the MRTG upgrade ?

Regards,
Olivier
NagiosXI 2009R1.4B
installed from vmware image.
No extras (gnome...)
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Performance graph : Unit error

Post by nscott »

Sure, I would like to make a disclaimer however, that this is still considered to be in testing but if you want, I strongly suggest you try it out on a test server before implementing it in a production environment.

The steps are short and simple. Grab the RPM from pbone for your architecture:
32-bit

Code: Select all

wget ftp://ftp.pbone.net/mirror/dag.wieers.com/redhat/el4/en/i386/extras/RPMS/mrtg-2.17.1-1.el4.rfx.i386.rpm
64-bit

Code: Select all

wget ftp://ftp.pbone.net/mirror/dag.wieers.com/redhat/el4/en/x86_64/extras/RPMS/mrtg-2.17.1-1.el4.rfx.x86_64.rpm
Then simply use rpm -Uvh mrtg-package-name to install it. You will need to restart Nagios. Now you should be running on the latest version MRTG.
Nicholas Scott
Former Nagios employee
cefi
Posts: 6
Joined: Mon Jun 13, 2011 8:52 am

Re: Performance graph : Unit error

Post by cefi »

hi,

i made the upgrade of MRTG on our test lab, and I still got the same graph error.

In the advanced tab of the service, I got : Performance Data: in=1.072643Mb/s;20;50 out=.000145Mb/s;20;50

And on the graph, I have for the in value : 1.07 B/s.
Seems it misses a multiplication by 1000 somewhere !

Did you do something more than the mrtg upgrade ?

And with the trick I told you earlier in this post, it works after removing the '%S' before each '$UNIT[]' value. Strange behaviour again.

Regards.
Olivier
NagiosXI 2009R1.4B
installed from vmware image.
No extras (gnome...)
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Performance graph : Unit error

Post by nscott »

No I didn't do anything different. I will attempt to recreate your issue and use your %S solution and see if I can work that into Nagios as a general solution for the problem. Thanks for the input.
Nicholas Scott
Former Nagios employee
cefi
Posts: 6
Joined: Mon Jun 13, 2011 8:52 am

Re: Performance graph : Unit error

Post by cefi »

Hello,

i'm back with this issue. I installed the change at my customer and the graph are working better.

But now I have the unit written as Mb_s instead of MB/s.
The perf data correctly gives a Mb/s output and we got Mb_s in the xml file created by PNP (located in /usr/local/nagios/share/perfdata/).
I believe that there is also a problem with the script libexec/process_perfdata.pl.

And finaly, when the used bandwidth is 800Kb/s for a graph that has the unit Mb/s, we got 800m for unit on the Y axis instead of 0,8Mb/s or 800Kb.
Maybe there is still a problem with the pnp template.

Olivier
NagiosXI 2009R1.4B
installed from vmware image.
No extras (gnome...)