Bandwidth Graphs

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ajwusv
Posts: 28
Joined: Tue Jul 05, 2011 10:13 am

Re: Bandwidth Graphs

Post by ajwusv »

I am also having an issue with the Switch/Router wizard for bandwidth graphs stating that /var/lib/mrtg/*ip address_5*.rrd does not exist.

I have configured two routers previously that are displaying bandwidth graphs, but any new ones I add are not being created. I already looked at the FAQ and ran the reset permissions script, that did not solve the issue. This is quite frustrating. I even tried running the cfgmaker and I see the ports in the mrtg.cfg file. What am I missing?

Thanks for all of help in advance.

edit: I may have spoken to soon. It looks like the cfgmaker did the trick. Now im just waiting for the actual graph to display. the bandwidth shows up in Service Status. Sorry for jumping the gun. Im just under the gun to get this working so I can show the powers that be.
Nagios XI
32 bit VM Image - 2011 R2.2
ajwusv
Posts: 28
Joined: Tue Jul 05, 2011 10:13 am

Re: Bandwidth Graphs

Post by ajwusv »

Any update on this?

I really need to get this working.

One graph that was previously working is now no longer displaying the graph.

The newer routers that I added are saying No performace graphs were found for this service.


Getting this working will determine if we purchase an unlimited Nagios XI license or not.

Thanks

Edit: I reverted back to the original process_perfdata.pl file and the bandwidth graphs are now showin up for all routers that Ive entered so far. Still working out the bugs for this thing
You do not have the required permissions to view the files attached to this post.
Nagios XI
32 bit VM Image - 2011 R2.2
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Bandwidth Graphs

Post by nscott »

Great. I see it still says b/s...

I just tried it again, and it was working for me. Can you try making a backup of the /usr/local/nagios/share/pnp/templates/check_xi_service_mrtgtraf.php and just pasting the code I gave you previously. If they weren't showing up that would mean there was a syntax error somewhere, and I know for certain there was no syntax error.

Code: Select all

mv /usr/local/nagios/share/pnp/templates/check_xi_service_mrtgtraf.php /usr/local/nagios/share/pnp/templates/check_xi_service_mrtgtraf.php.bak;echo '<?php
#
# Copyright (c) 2006-2008 Joerg Linge (http://www.pnp4nagios.org)
# Plugin: check_snmp_int.pl (COUNTER)
# $Id: check_xi_service_mrtgtraf.php 59 2010-03-08 22:56:21Z egalstad $
#
#
$opt[1] = " --vertical-label \"Traffic $UNIT[1]\" -E --title \"Interface Traffic for $hostname / $servicedesc\" ";
$def[1] = "DEF:var1=$rrdfile:$DS[1]:AVERAGE " ;
$def[1] .= "DEF:var2=$rrdfile:$DS[2]:AVERAGE " ;
$def[1] .= "CDEF:real1=var1,1,* " ;
$def[1] .= "CDEF:real2=var2,1,* " ;
$def[1] .= "LINE1:real1#003300:\"in  \" " ;
$def[1] .= "GPRINT:real1:LAST:\"%7.2lf $UNIT[1] last\" " ;
$def[1] .= "GPRINT:real1:AVERAGE:\"%7.2lf $UNIT[1] avg\" " ;
$def[1] .= "GPRINT:real1:MAX:\"%7.2lf $UNIT[1] max\\n\" " ;
$def[1] .= "LINE1:real2#00ff00:\"out \" " ;
$def[1] .= "GPRINT:real2:LAST:\"%7.2lf $UNIT[1] last\" " ;
$def[1] .= "GPRINT:real2:AVERAGE:\"%7.2lf $UNIT[1] avg\" " ;
$def[1] .= "GPRINT:real2:MAX:\"%7.2lf $UNIT[1] max\\n\" ";
if($NAGIOS_TIMET != ""){
    $def[1] .= "VRULE:".$NAGIOS_TIMET."#000000:\"Last Service Check \\n\" ";
}
if($NAGIOS_LASTHOSTDOWN != ""){
    $def[1] .= "VRULE:".$NAGIOS_LASTHOSTDOWN."#FF0000:\"Last Host Down\\n\" ";
}
?>
' > /usr/local/nagios/share/pnp/templates/check_xi_service_mrtgtraf.php
You could try pasting all that into the command line or just paste

Code: Select all

<?php
#
# Copyright (c) 2006-2008 Joerg Linge (http://www.pnp4nagios.org)
# Plugin: check_snmp_int.pl (COUNTER)
# $Id: check_xi_service_mrtgtraf.php 59 2010-03-08 22:56:21Z egalstad $
#
#
$opt[1] = " --vertical-label \"Traffic $UNIT[1]\" -E --title \"Interface Traffic for $hostname / $servicedesc\" ";
$def[1] = "DEF:var1=$rrdfile:$DS[1]:AVERAGE " ;
$def[1] .= "DEF:var2=$rrdfile:$DS[2]:AVERAGE " ;
$def[1] .= "CDEF:real1=var1,1,* " ;
$def[1] .= "CDEF:real2=var2,1,* " ;
$def[1] .= "LINE1:real1#003300:\"in  \" " ;
$def[1] .= "GPRINT:real1:LAST:\"%7.2lf $UNIT[1] last\" " ;
$def[1] .= "GPRINT:real1:AVERAGE:\"%7.2lf $UNIT[1] avg\" " ;
$def[1] .= "GPRINT:real1:MAX:\"%7.2lf $UNIT[1] max\\n\" " ;
$def[1] .= "LINE1:real2#00ff00:\"out \" " ;
$def[1] .= "GPRINT:real2:LAST:\"%7.2lf $UNIT[1] last\" " ;
$def[1] .= "GPRINT:real2:AVERAGE:\"%7.2lf $UNIT[1] avg\" " ;
$def[1] .= "GPRINT:real2:MAX:\"%7.2lf $UNIT[1] max\\n\" ";
if($NAGIOS_TIMET != ""){
    $def[1] .= "VRULE:".$NAGIOS_TIMET."#000000:\"Last Service Check \\n\" ";
}
if($NAGIOS_LASTHOSTDOWN != ""){
    $def[1] .= "VRULE:".$NAGIOS_LASTHOSTDOWN."#FF0000:\"Last Host Down\\n\" ";
}
?>
straight into a clean /usr/local/nagios/share/pnp/templates/check_xi_service_mrtgtraf.php, with no other text into it. Its slightly modified from last time, but if its not showing you anything then make double sure this is pasted in correctly.
Nicholas Scott
Former Nagios employee
ajwusv
Posts: 28
Joined: Tue Jul 05, 2011 10:13 am

Re: Bandwidth Graphs

Post by ajwusv »

Thanks. I will try this out when I get a chance.

I am finding that whenever I add a new router to be monitored with the wizard, I get the missing .rrd file. Most of the time if I run cfgmaker >> mrtg.cfg file with the ip of the router that I am trying to monitor, it resolves the issue. What can cause the rrd files to not be created? I thought the monitoring wizard was supposed to take care of that?

thanks again for all of the help
Nagios XI
32 bit VM Image - 2011 R2.2
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Bandwidth Graphs

Post by nscott »

Well, it usually takes a little while before the RRD is created. MRTG has to accrue enough information before it finally decides to create the RRD. If there is still no RRD after 10 minutes, then there is another problem, but otherwise its normal for a delay in RRD creation. If it is not creating RRDs on its own, then in /etc/mrtg/mrtg.cfg add

WorkDir: /var/lib/mrtg

right below all the other Dir entries, like LogDir, ThresDir etc.
Nicholas Scott
Former Nagios employee
ajwusv
Posts: 28
Joined: Tue Jul 05, 2011 10:13 am

Re: Bandwidth Graphs

Post by ajwusv »

Thanks for the info.

The one router in question still shows as unknown with the RRD file missing and I ran the cfgmaker for it on friday.

I will test those files you gave me today as well. For some reason on friday, the bandwidth graphs stopped displaying and just show speeds of 0 in and 0 out. I did not make any changes other than adding lines to the mrtg.cfg with cfgmaker.
Nagios XI
32 bit VM Image - 2011 R2.2
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Bandwidth Graphs

Post by nscott »

Did you enter the WorkDir after after adding the router? It should say the names of the .rrd files that haven't been made. You could try this:

Code: Select all

touch /var/lib/mrtg/<name of RRD file>
However, if it doesn't grab it in 10 minutes or so, you'll need to go the mrtg.cfg and remove (manually) the lines created for that router in particular and re-add it (making sure you've already add the WorkDir entry).
Nicholas Scott
Former Nagios employee
ajwusv
Posts: 28
Joined: Tue Jul 05, 2011 10:13 am

Re: Bandwidth Graphs

Post by ajwusv »

Thanks. Im going to try this now.

What would cause the bandwidth graphs to stop displaying bandwidth info?


edit: the graphs are now showing the proper format of Kb/s. now I just need to figure out why the graphs stopped displaying info.
Nagios XI
32 bit VM Image - 2011 R2.2
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Bandwidth Graphs

Post by nscott »

Do you see ANY graphs at all? Or has the current bandwidth graph just dropped off to zero?
Nicholas Scott
Former Nagios employee
ajwusv
Posts: 28
Joined: Tue Jul 05, 2011 10:13 am

Re: Bandwidth Graphs

Post by ajwusv »

the graphs display but they just dropped off to zero. this happened before i implemented the code that you provide me to show the Kb/s issue. just trying to pin point what would cause that to happen.
Nagios XI
32 bit VM Image - 2011 R2.2
Locked