Juniper Switches not graphing bandwidth and RRD errors.
Posted: Tue Feb 13, 2018 10:44 am
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' ###
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' ###