OSPF SNMP traps are missing in logs.We are only receiving OSPF down SNMP traps but we are not getting OSPF up SNMP traps.
You will receive below logs:
nttsuperadmin@NAV01A-DCI-RTR02-RE0> show log messages | match 100.68.1.168Feb 15 06:14:42 NAV01A-DCI-RTR02-RE0 rpd[35916]: RPD_LDP_NBRDOWN: LDP neighbor 100.68.1.168 (xe-1/0/3.0) is downFeb 15 06:14:42 NAV01A-DCI-RTR02-RE0 rpd[35916]: RPD_RSVP_NBRDOWN: RSVP neighbor 100.68.1.168 down on interface xe-1/0/3.0 nbr-type Direct, hello adjacency changeFeb 15 06:14:42 NAV01A-DCI-RTR02-RE0 rpd[35916]: RPD_OSPF_NBRDOWN: OSPF neighbor 100.68.1.168 (realm ospf-v2 xe-1/0/3.0 area 0.0.0.0) state changed from Full to Down due to KillNbr (event reason: interface went down)Feb 15 06:14:42 NAV01A-DCI-RTR02-RE0 bfdd[33866]: BFDD_STATE_UP_TO_DOWN: BFD Session 100.68.1.168 (IFL 380) state Up -> Down LD/RD(1563/1420) Up time:3d 11:22 Local diag: AdminDown Remote diag: None Reason: Received Upstream Destroy Session.Feb 15 06:14:42 NAV01A-DCI-RTR02-RE0 bfdd[33866]: BFDD_TRAP_SHOP_STATE_DOWN: local discriminator: 1563, new state: down, interface: xe-1/0/3.0, peer addr: 100.68.1.168Feb 15 06:14:50 NAV01A-DCI-RTR02-RE0 bfdd[33866]: BFDD_TRAP_SHOP_STATE_UP: local discriminator: 1563, new state: up, interface: xe-1/0/3.0, peer addr: 100.68.1.168Feb 15 06:14:52 NAV01A-DCI-RTR02-RE0 rpd[35916]: RPD_RSVP_NBRUP: RSVP neighbor 100.68.1.168 up on interface xe-1/0/3.0 nbr-type DirectFeb 16 14:51:12 NAV01A-DCI-RTR02-RE0 rpd[35916]: RPD_LDP_NBRDOWN: LDP neighbor 100.68.1.168 (xe-1/0/3.0) is downFeb 16 14:51:12 NAV01A-DCI-RTR02-RE0 rpd[35916]: RPD_RSVP_NBRDOWN: RSVP neighbor 100.68.1.168 down on interface xe-1/0/3.0 nbr-type Direct, hello adjacency changeFeb 16 14:51:12 NAV01A-DCI-RTR02-RE0 rpd[35916]: RPD_OSPF_NBRDOWN: OSPF neighbor 100.68.1.168 (realm ospf-v2 xe-1/0/3.0 area 0.0.0.0) state changed from Full to Down due to KillNbr (event reason: interface went down)Feb 16 14:51:12 NAV01A-DCI-RTR02-RE0 bfdd[33866]: BFDD_STATE_UP_TO_DOWN: BFD Session 100.68.1.168 (IFL 380) state Up -> Down LD/RD(1563/1420) Up time:1d 08:36 Local diag: AdminDown Remote diag: None Reason: Received Upstream Destroy Session.Feb 16 14:51:12 NAV01A-DCI-RTR02-RE0 bfdd[33866]: BFDD_TRAP_SHOP_STATE_DOWN: local discriminator: 1563, new state: down, interface: xe-1/0/3.0, peer addr: 100.68.1.168Feb 16 14:51:20 NAV01A-DCI-RTR02-RE0 bfdd[33866]: BFDD_TRAP_SHOP_STATE_UP: local discriminator: 1563, new state: up, interface: xe-1/0/3.0, peer addr: 100.68.1.168Feb 16 14:51:22 NAV01A-DCI-RTR02-RE0 rpd[35916]: RPD_RSVP_NBRUP: RSVP neighbor 100.68.1.168 up on interface xe-1/0/3.0 nbr-type DirectFeb 16 15:37:38 NAV01A-DCI-RTR02-RE0 rpd[35916]: RPD_LDP_NBRDOWN: LDP neighbor 100.68.1.168 (xe-1/0/3.0) is downFeb 16 15:37:38 NAV01A-DCI-RTR02-RE0 rpd[35916]: RPD_RSVP_NBRDOWN: RSVP neighbor 100.68.1.168 down on interface xe-1/0/3.0 nbr-type Direct, hello adjacency changeFeb 16 15:37:38 NAV01A-DCI-RTR02-RE0 rpd[35916]: RPD_OSPF_NBRDOWN: OSPF neighbor 100.68.1.168 (realm ospf-v2 xe-1/0/3.0 area 0.0.0.0) state changed from Full to Down due to KillNbr (event reason: interface went down)
The device was receiving logs for RPD_OSPF_NBRDOWN, but logs for RPD_OSPF_NBRUP were not being generated.
Upon reviewing the configuration, the syslog severity level was set to "notice" using the following configuration:
set system syslog file messages any notice
As per the hierarchy RPD_OSPF_NBRUP has higher precedence as "info" level message, it was not being logged with the above configuration whereby only "notice" was configured.
To resolve the issue, the severity level needs to be configured as "info" using:
set system syslog file messages any info
Setting the severity to "info" will log info messages as well as all higher severity levels.
You can use explorer link to verify as mentioned below:
https://apps.juniper.net/syslog-explorer/?msg=RPD_OSPF_NBRUP&sw=Junos%20OS&rel=25.4R1