Juniper Switches not graphing bandwidth and RRD errors.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
WVUhealth
Posts: 78
Joined: Tue Apr 24, 2012 1:50 pm

Juniper Switches not graphing bandwidth and RRD errors.

Post by WVUhealth »

We have two issues.
1st When we run the wizard to add new switch we are getting errors that the rrd file is not created.
2nd after "fixing" the error the Nagios is not graphing / monitoring any bandwidth on the switch. The interface status monitor is working and using Cacti we see bandwidth monitoring just fine.

Looking into the rrd file not created issue we can see the issue is with the mrtg config that was created by the wizard.
LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
ERROR: CFG Error in "maxbytes[hsc-2157-switch_651]", file /etc/mrtg/conf.d/hsc-2157-switch.cfg line 7262: 0 must be a Number bigger than 0

line 7262: MaxBytes[hsc-2157-switch_651]: 0

For some reason it has a Zero value for MaxBytes .. I have seen this on all the newly added Juniper switches


HERE is the full config for that interface with the manual "fix" for the MaxBytes and mrtg will make the rrd files for the system.
I just copied the MaxBytes vlaue from other interfaces in the cfg . Also note I never told nagios to monitor this port.

SetEnv[hsc-2157-switch_651]: MRTG_INT_IP="No Ip" MRTG_INT_DESCR="ge-1/0/24"
MaxBytes[hsc-2157-switch_651]: 12500000
Title[hsc-2157-switch_651]: Traffic Analysis for 651 -- hsc-2157-switch
PageTop[hsc-2157-switch_651]: <h1>Traffic Analysis for 651 -- hsc-2157-switch</h1>
<div id="sysdetails">
<table>
<tr>
<td>System:</td>
<td>hsc-2157-switch in </td>
</tr>
<tr>
<td>Maintainer:</td>
<td></td>
</tr>
<tr>
<td>Description:</td>
<td>ge-1/0/24 hsc-2157 </td>
</tr>
<tr>
<td>ifType:</td>
<td>ethernetCsmacd (6)</td>
</tr>
<tr>
<td>ifName:</td>
<td>ge-1/0/24</td>
</tr>
<tr>
<td>Max Speed:</td>
<td>0.0 Bytes/s</td>
</tr>
<tr>
<td>Ip:</td>
<td>No Ip (No DNS name)</td>
</tr>
</table>
</div>


### Interface 652 >> Descr: 'ge-1/0/24.0' | Name: 'ge-1/0/24.0' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ###
You do not have the required permissions to view the files attached to this post.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Juniper Switches not graphing bandwidth and RRD errors.

Post by cdienger »

What version of cfgmaker is on the machine? Check this by running:

cfgmaker --version

Also try running the cfgmaker from the command line and check if the MaxBytes field for that interface:

cfgmaker public@hsc-2157-switch

If this returns 125000(or another value besides 0) then there's likely something going wrong between cfgmaker and the wizard. Otherwise, the problem is on or between cfgmaker and the client somewhere.

There are two sets of rrd files. One will be under /var/lib/mrtg/hsc-2157-switch_651.rrd and the other under /usr/local/nagios/share/perfdata/hsc-2157-switch/hsc-2157-switch_651.rrd. Check to see if either of these have values:

rrdtool dump /var/lib/mrtg/hsc-2157-switch_651.rrd | grep -v NaN
rrdtool dump /usr/local/nagios/share/perfdata/hsc-2157-switch/hsc-2157-switch_651.rrd | grep -v NaN


Values would look something like:

<!-- 2018-02-13 20:05:00 UTC / 1518552300 --> <row><v> 2.3264222111e+03 </v><v> 7.0059785714e+00 </v></row>
<!-- 2018-02-13 20:10:00 UTC / 1518552600 --> <row><v> 2.2870998848e+03 </v><v> 6.7545010033e+00 </v></row>
<!-- 2018-02-13 20:15:00 UTC / 1518552900 --> <row><v> 2.3527693770e+03 </v><v> 3.4472489694e+01 </v></row>


If there are values in /var/lib/mrtg/hsc-2157-switch_651.rrd but not in /usr/local/nagios/share/perfdata/hsc-2157-switch/hsc-2157-switch_651.rrd, then it could be that there is a rounding issue. Try deleting the rrd and respective xml files and configure the command the use B instead of GB, MB, or KB.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked