Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
All I want to do is get is interface status info, UP or DOWN (is there a better script that does just that?).
I get:
Warning: Return code of 127 for check of service 'Te2/0/0 Link Status' on host 'XXXXXXX' was out of bounds. Make sure the plugin you're trying to run actually exists.
Nagios is running on FreeBSD, I'm not sure if it matters.
I tried adding /usr/bin/perl in front of $USER1$ in resources.cfg, but to no avail.
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.
Since I'm polling several interfaces, each by itself, for every interface, script polls router for name of interface, even though if would be enough to poll for names once each turn. Any chance this can be optimized? Or perhaps there is a simpler script that check just on interface state?
./check_snmp_int.pl -H 127.0.0.1 -C public -n "Fast.*0.1[1234]"
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.
But it seems even with that option, script check for interface description for each interface.
The problem is if you have lots of subinterfaces, when you poll for TenGigE0/0/0/1 and TenGigE0/0/0/2, for each interface it gets list of ALL interfaces, including subinterfaces, which makes NAGIOS report lots of UNKNOWN STATE messages.
Is there a way to optimize this?
Is there a way to specify ifIndex OID directly of interface, rather than poll for interface name? Maybe a differen script
Not really with this plugin. Most people create separate checks for each interface so they can be disabled/enabled at will - additionally, separate checks will not run into issues with rrds and datasources.
bbzz wrote:Can't seem to find check_snmp_int.c for FreeBSD.
Well, this check is a perl script. I have no idea if a c version even exists, regardless of platform.
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.
Well, I ended up installing this on OpenBSD platform; it comes with check_snmp.c which directly polls for specific oid thereby reducing snmp traffic and load on router.
However, the load is still significant on host CPU. I followed recommendation for large installation tunning, but I think CPU spikes have to do mostly with snmpget requests for ifOperStatus oids. I'm not sure how to optimize this, and I don't think it has to do with Nagios itself.
Any other comment on this are welcomed. By the way I run this on SunFirev440 Sparc64 host.
Yes these checks can be quite intensive due to their nature, what kind of hardware are you running on the Nagios server? How often are you running these active SNMP checks, and how many of them are there?