Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_ospf_nbr

Rating
1 vote
Favoured:
0
Current Version
0.31
Last Release Date
2019-01-12
Compatible With
  • Nagios 4.x
License
LGPL
Hits
6340
Files:
FileDescription
nagios-plugins-trh-0.20.tar.gzSource tar ball version 0.20
nagios-plugins-trh-0.31.tar.gzSource tar ball versoin 0.31
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
Checks OSPF v2 and v3 adjacencies (neighbours) using SNMP.
Usage: check_ospf_nbr {-2|3} -H host [options]

Check OSPF neighbour adjacency status of a router using SNMP. Neighbour can be
specified by peer IP address, router-id, and/or interface name, e.g. to check
that the router has a neighbour with router-id R on interface I. The
adjacency with the neighbour must be in state FULL for it to be considered OK.
Either or both of OSPF v2 and OSPF v3 neighbours can be checked at the same
time.

Options:
--version show program's version number and exit
-h, --help show this help message and exit
-H HOST, --host=HOST Hostname/address of router to query; mandatory option
-C COMMUNITY, --community=COMMUNITY
SNMP community [default: public]
-c COMMUNITY Alias for -C/--community for backward compatibility
with older versions of this plugin
-v SNMP_VERSION, --snmp-version=SNMP_VERSION
SNMP version to use [default: 2].
-N NEIGHBOUR_ID, --neighbour-id=NEIGHBOUR_ID, --nbr=NEIGHBOUR_ID
Router-id of neighbour, as a dotted quad, or as a
decimal, octal or hexadecimal integer
-P PEER_ADDRESS, --peer-address=PEER_ADDRESS
IPv4 address of neighbour; only used for OSPFv2. This
can be specified as a numeric address or as a host
name that will be resolved.
-I INTERFACE, --interface=INTERFACE
Layer 3 interface where neighbour should be found.
[default: any]
-2, --ospfv2 Look for OSPFv2 neighbour [default: False]
-3, --ospfv3 Look for OSPFv3 neighbour [default: False].
--vendor=VENDOR Handle quirks for specific network OS [default:
autodetect]

The plugin is written in Python 2. It requires the Python bindings to net-snmp (the net-snmp-python RPM in RHEL/Fedora), and the ipaddr Python module (the python-ipaddr RPM in RHEL/Fedora).
Reviews (1)
Router uses two OSPF processes, one with vrf
## show all neighbors, all processes
rtpe-pruszkow#sh ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface
212.69.65.137 1 FULL/DR 00:00:06 172.16.100.1 GigabitEthernet0/0.689
N/A 0 ATTEMPT/DROTHER - 172.16.100.34 GigabitEthernet0/0.688
212.69.65.124 1 FULL/BDR 00:00:39 172.16.100.3 GigabitEthernet0/0.687
172.16.255.110 1 FULL/DR 00:00:30 172.50.110.2 GigabitEthernet0/0.390

Plugin:

/usr/lib/nagios/plugins/check_ospf_nbr.py -2 -C compagi0905 -H mpwik-rtpe-pru -v 2 --vendor ios -P 172.16.100.1
CRITICAL: No matching OSPFv2 neighbour

/usr/lib/nagios/plugins/check_ospf_nbr.py -2 -C compagi0905 -H mpwik-rtpe-pru -v 2 --neighbour-id 212.69.65.137 --vendor ios
CRITICAL: No matching OSPFv2 neighbour
Owner's reply

Sorry I did not see this report until now.

I don't have access to any Cisco router myself, but I would be interrested in getting my plugin to work with IOS. Would it be possible for you to send me the output of the command

snmpwalk -v2c -c compagi0905 mpwik-rtpe-pru OSPF-MIB::ospfNbrTable

along with the output from 'show ip ospf neighbor' at the same time?

You mention running two OSPF processes; could this be related to that? I know that for Juniper Junos, you need to give a SNMP community on the form @ to see OSPF information in another routing instance. Is there some similar trick for Cisco IOS?

(If you can log an issue in the issue-tracker at https://git.lysator.liu.se/bellman/nagios-plugins-trh/-/issues , that might be a better venue for debugging this.)