I was running on empty last night trying to figure this out. Here is some more information which may help get to the bottom of the problem. The goal is to move the interface stats and counters from an existing monitored interface to a new interface. The method used was to go to CCM and edit the service for the bandwidth monitor to the correct value for the new interface. In the workflow below, I am moving the cable from interface s0/0/1:0 to S0/1/0:0 and I want all of the bandwidth charts to move with the interface so we keep the history.
First I got a list of interfaces from the router:
Code: Select all
Router#sh snmp mib ifmib ifindex
Serial0/0/1:0: Ifindex = 28
Serial0/1/0:0: Ifindex = 29
I went into the GUI to Configure > Core Config Manager > Services and searched for my device. I selected the Bandwidth service and changed the Config Name, Description and $ARG1$ to the correct port number as shown by the Cisco CLI command above for bandwidth:
$ARG1$ 10.104.255.209_28.rrd Changed to 10.104.255.209_29.rrd
I try a Test Command Check and get this:
Code: Select all
COMMAND: /usr/local/nagios/libexec/check_rrdtraf -f /var/lib/mrtg/10.104.255.209_29.rrd -w 1000,1000 -c 1200,1200 -l K
OUTPUT: OK -[color=#FF0000] Current BW in: 0Kbps Out: 0Kbps|in=0Kb/s[/color];1000;1200 out=0Kb/s;1000;1200
I know this is incorrect because I see traffic on this interface:
Code: Select all
Serial0/1/0:0 is up, line protocol is up
Hardware is GT96K Serial
Description: ATT AVPN DHEC302717.812
MTU 1500 bytes, BW 1536 Kbit/sec, DLY 20000 usec,
reliability 255/255,[color=#FF0000] txload 4/255, rxload 18/255[/color]
I think this is the root of the problem.
I also noticed that the monitoring settings look a little off to me. For the new interface, I see this:
check_xi_service_mrtgtraf!10.104.255.209_29.rrd!1000,1000!1200,1200!K!!!!
This one has a bunch of extra exclamation marks at the end where a lot of my other interfaces on different routers do not.
The working interface on this router also has the extra exclamation marks so it may be nothing...
If I do that same test to the interface that I COPIED from this interface, it works fine.
Code: Select all
COMMAND: /usr/local/nagios/libexec/check_rrdtraf -f /var/lib/mrtg/10.104.255.209_27.rrd -w 1000,1000 -c 1200,1200 -l K
OUTPUT: OK - Current BW in: 115.25Kbps Out: 34.24Kbps|in=115.257695Kb/s;1000;1200 out=34.248656Kb/s;1000;1200
Now the only difference is that on the interface 29, I moved the rrd information from the old interface to the new one to save the history like this:
mv /var/lib/mrtg/10.104.255.209_28.rrd /var/lib/mrtg/10.104.255.209_29.rrd
Is that correct?
I also edited the file below to uncomment interface 29 and comment out interface 28 per instructions in another post.
vi /etc/mrtg/conf.d/10.104.255.209.cfg
Here is what those interfaces look like now:
Code: Select all
### Interface 28 >> Descr: 'Serial0/0/1:0' | Name: 'Se0/0/1:0' | Ip: '' | Eth: '' ###
### The following interface is commented out because:
### * it is administratively DOWN
#Target[10.104.255.209_28]: 28:[email protected]:::::2
#noHC[10.104.255.209_28]: yes
#SetEnv[10.104.255.209_28]: MRTG_INT_IP="" MRTG_INT_DESCR="Serial0/0/1:0"
#MaxBytes[10.104.255.209_28]: 192000
#Title[10.104.255.209_28]: Traffic Analysis for 28 -- Router
#PageTop[10.104.255.209_28]: <h1>Traffic Analysis for 28 -- Router</h1>
# <div id="sysdetails">
# <table>
# <tr>
# <td>System:</td>
# <td>Router in </td>
# </tr>
# <tr>
# <td>Maintainer:</td>
# <td>REDACTED</td>
# </tr>
# <tr>
# <td>Description:</td>
# <td>Serial0/0/1:0 cloud blah </td>
# </tr>
# <tr>
# <td>ifType:</td>
# <td>ppp (23)</td>
# </tr>
# <tr>
# <td>ifName:</td>
# <td>Se0/0/1:0</td>
# </tr>
# <tr>
# <td>Max Speed:</td>
# <td>192.0 kBytes/s</td>
# </tr>
# </table>
# </div>
### Interface 29 >> Descr: 'Serial0/1/0:0' | Name: 'Se0/1/0:0' | Ip: '' | Eth: '' ###
Target[10.104.255.209_29]: 29:[email protected]:::::2
noHC[10.104.255.209_29]: yes
SetEnv[10.104.255.209_29]: MRTG_INT_IP="" MRTG_INT_DESCR="Serial0/1/0:0"
MaxBytes[10.104.255.209_29]: 192000
Title[10.104.255.209_29]: Traffic Analysis for 29 -- Router
PageTop[10.104.255.209_29]: <h1>Traffic Analysis for 29 -- Router</h1>
<div id="sysdetails">
<table>
<tr>
<td>System:</td>
<td>Router in </td>
</tr>
<tr>
<td>Maintainer:</td>
<td>REDACTED</td>
</tr>
<tr>
<td>Description:</td>
<td>Serial0/1/0:0 </td>
</tr>
<tr>
<td>ifType:</td>
<td>ppp (23)</td>
</tr>
<tr>
<td>ifName:</td>
<td>Se0/1/0:0</td>
</tr>
<tr>
<td>Max Speed:</td>
<td>192.0 kBytes/s</td>
</tr>
</table>
</div>
I noticed that this file seems to not do anything at all though as I changed the descriptions in the GUI and it is not reflected here. Also, changes to the descriptions here do not reflect in the GUI. What is this file used for and how is it used?
I also found some file in /usr/local/nagios/share/perfdata/Router but I am not sure if I need to do anything there. What are these directories used for and what information do they contain?