How to send SNMP trap to alert when a BGP neighbor connection goes up/down
2239
Created On 08/24/20 18:35 PM - Last Modified 09/24/25 22:48 PM
Objective
To show how to monitor the BGP neighbor state connections during flap.
Environment
- Palo Alto Firewall
- Supported PAN-OS
- BGP
- SNMP
Procedure
If you want to monitor the up/down state you can forward the specific System log entries to an SNMP trap.
Use the procedure below
- In Device -> Log Settings -> System -> Add
-
- In Filter click on 'Filter Builder'
- For 'Connector' select 'and'.
- For 'Attribute' select 'Description'.
- For 'Operator' select 'contains'.
- In the 'Value' field type 'BGP'.
- Click 'Add'
- Now add a second Filter for the same
-
- For 'Connector' select 'and'
- For 'Attribute' select 'Severity'.
- For 'Operator' select 'equal'.
- For the 'Value' select the severity you want to monitor (e.g. high)
- Click 'Add'
- Now Select the SNMP Server these logs should be forwarded to
- Click OK.
- Commit the configuration.
- Now the System logs with description having "BGP" and severity as "high" are sent to the SNMP trap server.
- Repeat the same process for "critical" and other severity to be monitored.
- Screenshot of the "high" severity filter below.
Additional Information
- How to Configure SNMPv2 on the Palo Alto Networks Firewall
- There are no MIBs to poll the BGP status of the peers. but there there are SNMP Traps that can be used to report the BGP peer status change.
- Refer to the Traps below for information
| Name | OID | MIB NAME | Description |
| panROUTINGRoutedBGPPeerEnterEstablishedTrap | .1.3.6.1.4.1.25461.2.1.3.2.0.1531 | MIB PAN-TRAPS | BGP peer session enters established state |
| panROUTINGRoutedBGPPeerLeftEstablishedTrap | 1.3.6.1.4.1.25461.2.1.3.2.0.1532 | MIB PAN-TRAPS | BGP peer session left established state. |
| panROUTINGRoutedBGPPeerFailedTrap | 1.3.6.1.4.1.25461.2.1.3.2.0.1533 | MIB PAN-TRAPS | BGP peer session has failed and may restart. |
| panROUTINGRoutedBGPPeerRestartedTrap | 1.3.6.1.4.1.25461.2.1.3.2.0.1534 | MIB PAN-TRAPS | Initiated graceful-restart with a BGP peer. |
| panROUTINGRoutedBGPPeerRestartFailedTrap | .1.3.6.1.4.1.25461.2.1.3.2.0.1535 | MIB PAN-TRAPS | Graceful-restart with a BGP peer failed. |
| panROUTINGRoutedBGPRefreshSentTrap | 1.3.6.1.4.1.25461.2.1.3.2.0.1536 | MIB PAN-TRAPS | ROUTE REFRESH message sent to a BGP pee |
| panROUTINGRoutedBGPRibinRecalcTrap | 1.3.6.1.4.1.25461.2.1.3.2.0.1537 | MIB PAN-TRAPS | An RIB-In is being recalculated as a result of changed import policy. |