ifspeed - cisco router

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
joehamm
Posts: 10
Joined: Tue Sep 10, 2013 11:29 am

ifspeed - cisco router

Post by joehamm »

our cisco router is reporting its ifspeed at 4.29Gbs - while this may be accurate, the circuit is only 1Gbs
I have been unable to find where to change this so that our utilization graph reports correctly relative to the circuit
I would expect that there would be a file or db entry that I could modify

Any direction would be appreciated
Thanks in advance
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: ifspeed - cisco router

Post by abrist »

Is that speed reported through snmp?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
joehamm
Posts: 10
Joined: Tue Sep 10, 2013 11:29 am

Re: ifspeed - cisco router

Post by joehamm »

yes, ifspeed is reported via SNMP
Nagios, when I run a monitoring wizard collects the interface ifspeed for all interfaces on the device
it just happens that the Cisco reports the information incorrectly
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: ifspeed - cisco router

Post by abrist »

You would need to alter the mrtg entries for this port. or remove the port from your mrtg file and re-add it through the wizard, altering the speed. Do note: doing this will most likely skew the speed reports and you will most likely lose any historical data collected up to this point.
http://assets.nagios.com/downloads/nagi ... Router.pdf
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
joehamm
Posts: 10
Joined: Tue Sep 10, 2013 11:29 am

Re: ifspeed - cisco router

Post by joehamm »

i have no issue giving up the data to this point as it is incorrect
however the procedure you provided - I don't believe will help me
when I rediscover the device - it still queries the MIB OID via SNMP and gets the wrong port speed again
during the monitor wizard - I do not have the ability to modify the ifspeed - would have already done so if I could have

so I need to modify after the fact
the value has to be stored somewhere because calculations are performed using the information
I don't believe it to be the mrtg files as that appears to have the threshold values for alerts - not the ifspeed
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: ifspeed - cisco router

Post by abrist »

There are only two places that could contain this information - the check command (or plugin), and the mrtg configuration. The switch and router wizard should give you the option of changing what you want to set as warning/critical. The ifspeed is just the max cap. You should still receive metrics in bit/bytes.
The check only includes the the thresholds, so the proper place to look, *is* the /etc/mrtg/mrtg.cfg file. Each interface should include a MaxBytes Directive, lik:

Code: Select all

MaxBytes[192.168.5.1_6]: 12500000
This is the value you most probably want to change. Do understand that you may need to remove the RRD and XML perfdata associated with this check to get them to regenerate with the correct values.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
joehamm
Posts: 10
Joined: Tue Sep 10, 2013 11:29 am

Re: ifspeed - cisco router

Post by joehamm »

abrist wrote:There are only two places that could contain this information - the check command (or plugin), and the mrtg configuration. The switch and router wizard should give you the option of changing what you want to set as warning/critical. The ifspeed is just the max cap. You should still receive metrics in bit/bytes.
The check only includes the the thresholds, so the proper place to look, *is* the /etc/mrtg/mrtg.cfg file. Each interface should include a MaxBytes Directive, lik:

Code: Select all

MaxBytes[192.168.5.1_6]: 12500000
This is the value you most probably want to change. Do understand that you may need to remove the RRD and XML perfdata associated with this check to get them to regenerate with the correct values.
it does give the option of changing the warning/critical - except that that is irrelevant when the value used for ifspeed is incorrect - the ifspeed is not able to be changed
also warning/critical can be changed later in gui - also note that these are in % - so if i set a threshold of 50% based on a 1 gig circuit - i would be looking for 500 Mbs - but as the calculation for the utilization is based on ifspeed.... which is set to 4.29 Gbs - my alerts would not trigger until I hit 2.14Gbs - sure I could play with it so it alerts at whatever I want but it would be much simpler to reset the value for ifspeed
plus, the data provided is also off - any utilization graph is meaningless to any typical user who doesn't know it is wrong
MaxBytes is thresholds for alerts

and as i mentioned earlier - i have no issue completely removing the device and all data files related to it - they are all meaningless at this time as they are incorrect as they are based on the incorrect ifspeed value

the only place I have seen anything so far that I believe could be changed is the mysql DB and as I inherited this system - I do not have write access - just about ready to blow the entire build away - at least then I could try and modify the mysql but had hoped that Nagios was more easily updated - inaccurate MIB values are not so uncommon that we should not be able to update them
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: ifspeed - cisco router

Post by abrist »

joehamm wrote:MaxBytes is thresholds for alerts
Let me quote this:
MaxBytes

The maximum value either of the two variables monitored are allowed to reach. For monitoring router traffic this is normally the bytes per second this interface port can carry.

If a number higher than MaxBytes is returned, it is ignored. Also read the section on AbsMax for further info. The MaxBytes value is also used in calculating the Y range for unscaled graphs (see the section on Unscaled).

Since most links are rated in bits per second, you need to divide their maximum bandwidth (in bits) by eight (8) in order to get bytes per second. This is very important to make your unscaled graphs display realistic information. T1 = 193000, 56K = 7000, 10 MB Ethernet = 1250000, 100 MB Ethernet = 12500000. The MaxBytes value will be used by mrtg to decide whether it got a valid response from the router.

If you need two different MaxBytes values for the two monitored variables, you can use MaxBytes1 and MaxBytes2 instead of MaxBytes.

Example:

MaxBytes[myrouter]: 1250000
http://oss.oetiker.ch/mrtg/doc/mrtg-reference.en.html

Changing the SQL will not help. The sql only includes the check information:

Code: Select all

$USER1$/check_rrdtraf -f /var/lib/mrtg/$ARG1$ -w $ARG2$ -c $ARG3$ -l $ARG4$
Where:

Code: Select all

$ARG1$ is the rrd file.
$ARG2$ is warning
$ARG3$ is critical
$ARG4$ is display label.
Again, what you need to do is:
1. Change the mrtg "MaxBytes" information
2. Remove the relevant rrd from /var/lib/mrtg
3. Remove the relevant rrd and xml from /usr/local/nagios/share/perfdata/<hostname>/
4. And then wait for two checks time.

The values that you want to change, can only be done in the RRD. The rrd gets generated from the mrtg rrd and subsequently the mrtg config. . . .
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: ifspeed - cisco router

Post by BanditBBS »

I have to jump in here. Setting port speed is an option during the wizard, in two spots.

First on the initial screen:
1.JPG
Then on the screen after it finds all your ports:
2.JPG
if it doesn't show the proper speed on the second screen, like mine shows 100.00Mbps, then I am afraid that is a switch issue and not sure it can be resolved.

EDIT: I worded that wrong. You can only set the default speed on first page. The second page just shows you what is discovered and the w and c ranges. Sorry for confusion. Original statement is still true I believe. If not detected properly, I believe it is a switch issue and one I have never seen before.
You do not have the required permissions to view the files attached to this post.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: ifspeed - cisco router

Post by abrist »

Thanks for the help Jim.

Joe: let us know how this works out for you.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked