How can I pull OSPF neighbor adjacency time via SNMP?

Hello,

In the command line I can see the OSPF neighbor’s adjacency time:

[me@router] /routing ospf neighbor> print
0 instance=default router-id=1.2.3.4 address=1.2.3.4 interface=IF1 priority=1 dr-address=0.0.0.0 backup-dr-address=0.0.0.0
state=“Full” state-changes=16 ls-retransmits=0 ls-requests=0 db-summaries=0 adjacency=18h54m23s

But I would really like to get this data via SNMP. Is that possible?

Thanks!

Most submenus that have information accessible via an SNMP OID will reveal the OIDs to you with the ‘print oid’ command (for example, ‘/interface print oid’ will show you the OIDs for each interface). This command does not appear to be available under any of the ‘/routing’ submenus, so I have my doubts that there is an OID that exists for this information. (Also, if I try walking the OID on a MikroTik that Cisco uses for OSPF neighbor table information (.1.3.6.1.2.1.14.10), I get back nothing.)

If you are handy with scripting at all, you could surely devise a way to get the information you want programmatically using the RouterOS API.

– Nathan