How to get OSPF neighbor hostname/sysName

Hello,

We are using in-build OSPF down notification rules ospf_nbrs.ospfNbrState != “full” to get notification and in the Alert Template using the following:

if ($alert->faults)
foreach ($alert->faults as $key => $value)


#{{ $key }}: {{ $value[’’] }}






Peer IP Address: {{ $value[‘ospfNbrIpAddr’] }}

Peer Loopback Address: {{ $value[‘ospfNbrRtrId’] }}

OSPF Status: {{ $value[‘ospfNbrState’] }}

Peer RTR Name: {{ $value[‘sysName’] }}



*

Above give us correct Peer IP address and Peer Loopback address without any issue. But instead of Peer Loopback address, we like to get sysName.

From the database table, we can see there is a table as device_id which shows number, so we are hoping for code that actually compare the device_id and show us the SysName associated with device_id.