BGP Monitoring Protocol

The BGP Monitoring Protocol (BMP) provides a convenient interface for obtaining route views. The integration in Horizon lets you use these route views, status updates, and statistics for monitoring and management.

bmp integration overview
Figure 1. BMP integration overview

BMP TCP Parser

The BMP parser accepts BMP connections from router packets using a TCP Listener.

Facts

Class Name

org.opennms.netmgt.telemetry.protocols.bmp.parser.BmpParser

Configuration and use

Table 1. Optional parameters for the BMP Parser
Parameter Description Default

dnsLookupsEnabled

Enable or disable DNS resolution of router and peer hostnames.

true

bulkhead.maxConcurrentCalls

Limit the number of parallel parsing operations.

1000

bulkhead.maxWaitDurationMs

Limit the amount of time to wait for a saturated bulkhead (in milliseconds).

5 minutes

Configure BMP listener on a Minion

To enable and configure a TCP listener for BMP on Minion, connect to the Karaf Console and set the following properties:

The protocol must also be enabled on Horizon for the messages to be processed.
From the Minion’s Karaf console
config:edit --alias tcp-5000 --factory org.opennms.features.telemetry.listeners
config:property-set name BMP
config:property-set class-name org.opennms.netmgt.telemetry.listeners.TcpListener
config:property-set parameters.port 5000
config:property-set parsers.0.name BMP
config:property-set parsers.0.class-name org.opennms.netmgt.telemetry.protocols.bmp.parser.BmpParser
config:update

If you do not specify the queue name, the fallback is the name of the parser.

BMP telemetry adapter

The BMP telemetry adapter handles BMP statistics received and parsed by the BMP parser. Statistics received from the router are associated as performance data with that router. The router must exist as a regular node in Horizon.

Horizon uses the IP address exported in BMP messages to associate a router with the appropriate Horizon node. In addition, the node’s metadata can be used to specify a BGP ID, which will be used to associate routers. If the parameter metaDataNodeLookup is not empty, it will be interpreted as a context:key metadata name, which will be used to look up a node that has stored the queried BGP ID as a value in the specified key.

Facts

Class Name

org.opennms.netmgt.telemetry.protocols.bmp.adapter.BmpTelemetryAdapter

Configuration and use

Table 2. Optional parameters for the BMP telemetry adapter
Parameter Description Default

metaDataNodeLookup

Enables lookup using BGP IDs.

n/a

BMP Peer Status Adapter

The BMP peer status adapter creates events for peer status changes. It handles BMP Peer Up and Down messages that the BMP Parser receives and parses, and converts to Horizon events. Horizon associates the created events with the router sending the messages. This router must exist as regular node in Horizon.

The events are called uei.opennms.org/bmp/peerUp and uei.opennms.org/bmp/peerDown.

Horizon uses the IP address exporting BMP messages to associate a router with the particular Horizon node. In addition, the node’s metadata can specify a BGP ID, which will then be used to associate routers. If the parameter metaDataNodeLookup is not empty, it will be interpreted as a context:key metadata name, which will be used to lookup a node that has stored the queried BGP ID as a value in exactly this key.

Facts

Class Name

org.opennms.netmgt.telemetry.protocols.bmp.adapter.BmpPeerStatusAdapter

Configuration and use

Table 3. Optional parameters for the BMP telemetry adapter
Parameter Description Default

metaDataNodeLookup

Enables lookup using BGP IDs.

n/a

OpenBMP integration adapter

The OpenBMP integration adapter can integrate with an existing OpenBMP installation. It handles BMP messages the BMP Parser receives and parses, and creates OpenBMP-compatible messages, which are then passed to the OpenBMP Kafka cluster.

This setup replaces the collector component of OpenBMP.

Facts

Class Name

org.opennms.netmgt.telemetry.protocols.bmp.adapter.openbmp.BmpIntegrationAdapter

Configuration and use

Table 4. Optional parameters for the OpenBMP Integration Adapter
Parameter Description Default

kafka.*

Uses options to create OpenBMP Kafka producer. Enables all known Kafka settings, but with kafka. prefixed.

n/a

topicPrefix

Prefix used before each Kafka topic.

n/a

BMP persisting adapter

The BMP Persisting adapter persists OpenBMP messages received without the need for any additional OpenBMP components. It handles BMP messages the BMP Parser receives and parses, and creates OpenBMP-compatible messages, which are then persisted in OpenNMS Postgres DB.

Facts

Class Name

org.opennms.netmgt.telemetry.protocols.bmp.adapter.BmpPersistingAdapter

Stats and retrieving data from external data for rpki/routeinfo/asinfo are handled only on Horizon. The opennms-telemetry-bmp-stats feature needs to be installed on Horizon.

BMP Stats are stored as time series data in Postgres with TimescaleDB extension. TimescaleDB 2.x extension installation instructions. For opennms schema, TimescaleDB extension can be added with -t option on install DB script(for example, $OPENNMS_HOME/bin/install -dist). If the TimescaleDB extension is not installed, stat tables will not be converted to hypertables.

To load the adapter while Horizon is running, use the following command in the Karaf shell.

feature:install opennms-telemetry-bmp-stats

To ensure that the feature continues to be installed on subsequent restarts, add opennms-telemetry-bmp-stats to a file in featuresBoot.d:

echo "opennms-telemetry-bmp-stats" | sudo tee ${OPENNMS_HOME}/etc/featuresBoot.d/telemetry-bmp.boot

Configuration BMP persistence for external sources

You can configure the following parameters when connecting to external sources like RPKI or RouteInfo DB tables.

Name Description Default

rpkiUrl

Rest API URL to retrieve RPKI ROAs.

http://localhost:8080/api/export.json

rpkiUsername

Username for RPKI Rest API.

rpkiPassword

Password for RPKI Rest API.

routeInfoDbPath

Path for RouteInfo DB tables.

${karaf.etc}/routeinfo

Configure the above parameters as follows on the core via Karaf:

config:edit org.opennms.features.telemetry.protocols.bmp.adapter.persist
config:property-set rpkiUrl http://localhost:8080/api/export.json
config:update

Running BMP Adapter on Sentinel

BMP Persisting Adapter can also run on Sentinel. Sentinel must start the appropriate BMP adapter. In Sentinel, adapters are configured either by placing a .cfg file in ${SENTINEL_HOME}/etc or via a config:edit statement.

The following example configures the consumption of BMP messages and saves the configuration in ${SENTINEL_HOME}/etc/org.opennms.features.telemetry.adapters-bmp.cfg.

First, login to the Karaf Shell.

$ ssh -p 8301 admin@localhost
config:edit --alias BMP --factory org.opennms.features.telemetry.adapters
config:property-set name BMP
config:property-set adapters.0.name BMP-Persisting-Adapter
config:property-set adapters.0.class-name org.opennms.netmgt.telemetry.protocols.bmp.adapter.BmpPersistingAdapter
config:update

Install the following features via Karaf shell to start processing BMP messages on Sentinel.

feature:install sentinel-core
feature:install sentinel-persistence (1)
feature:install sentinel-jms (2)
feature:install sentinel-blobstore-noop
feature:install sentinel-jsonstore-postgres
feature:install sentinel-telemetry-bmp-persist
1 Needs datasource configuration setup per Sentinel Flow Processing.
2 Can alternatively be set to sentinel-kafka based on your selected message broker. Refer to Sentinel Kafka Configuration.
When running Kafka as the broker, the consumer config needs to have the auto.offset.reset=earliest setting, otherwise the BMP Adapter may miss some of the early messages, like the PeerUp notification, which are essential for proper BMP state.