BGP Monitoring Protocol

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

BMP integration overview

BMP integration

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

Parameters

Table 1. Parameters for the BMP Parser
Parameter Description Required Default value

dnsLookupsEnabled

Enable or disable DNS resolution of router and peer hostnames.

no

true

bulkhead.maxConcurrentCalls

Limit the number of parallel parsing operations.

no

1000

bulkhead.maxWaitDurationMs

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

no

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:

$ ssh -p 8201 admin@localhost
...
admin@minion()> config:edit --alias tcp-5000 --factory org.opennms.features.telemetry.listeners
admin@minion()> config:property-set name BMP
admin@minion()> config:property-set class-name org.opennms.netmgt.telemetry.listeners.TcpListener
admin@minion()> config:property-set parameters.port 5000
admin@minion()> config:property-set parsers.0.name BMP
admin@minion()> config:property-set parsers.0.class-name org.opennms.netmgt.telemetry.protocols.bmp.parser.BmpParser
admin@minion()> config:update
The protocol must also be enabled on Meridian for the messages to be processed. 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 Meridian.

Meridian uses the IP address exporting BMP messages to associate a router with the particular Meridian 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.BmpTelemetryAdapter

Parameters

Table 2. Parameters for the BMP Telemetry Adapter
Parameter Description Required Default value

metaDataNodeLookup

Enables lookup using BGP IDs.

no

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 Meridian events. Meridian associates the created events with the router sending the messages. This router must exist as regular node in Meridian.

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

Meridian uses the IP address exporting BMP messages to associate a router with the particular Meridian 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

Parameters

Table 3. Parameters for the BMP Telemetry Adapter
Parameter Description Required Default value

metaDataNodeLookup

Enables lookup using BGP IDs.

no

OpenBMP Integration Adapter

The OpenBMP integration adapter integrates 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

Parameters

Table 4. Parameters for the OpenBMP Integration Adapter
Parameter Description Required Default value

kafka.*

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

no

topicPrefix

Prefix used before each Kafka topic.

no

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 Meridian. The opennms-telemetry-bmp-stats feature needs to be installed on Meridian.

BMP Stats are stored as time series data in Postgres with TimescaleDB extension. You can install TimescaleDB 2.x extension from here. For opennms schema, TimescaleDB extension can be added with -t option on install DB script. In case TimescaleDB extension is not installed, stat tables will not be converted to hypertables.

admin@opennms()> feature:install opennms-telemetry-bmp-stats

To ensure that the feature continues to be installed on subsequent restarts, add opennms-telemetry-bmp-stats to the featuresBoot property in ${OPENNMS_HOME}/etc/org.apache.karaf.features.cfg.

Configuration BMP persistence for external sources

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

Name Default Value Description

rpkiUrl

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

Rest API URL to retrieve RPKI ROAs.

rpkiUsername

``

username for RPKI Rest API.

rpkiPassword

``

password for RPKI Rest API.

routeInfoDbPath

$[karaf.etc]/routeinfo

Path for RouteInfo DB tables.

Configure the above parameters as follows:

$ ssh -p 8101 admin@localhost
...
admin@opennms()> config:edit org.opennms.features.telemetry.protocols.bmp.adapter.persist
admin@opennms()> config:property-set rpkiUrl http://localhost:8080/api/export.json
admin@opennms()> config:update

Running BMP Adapter on Sentinel

BMP Persisting Adapter can also run on Sentinel. , Sentinel must start 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 will configure 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
admin@sentinel> config:edit --alias BMP --factory org.opennms.features.telemetry.adapters
admin@sentinel> config:property-set name BMP
admin@sentinel> config:property-set adapters.0.name BMP-Persisting-Adapter
admin@sentinel> config:property-set adapters.0.class-name org.opennms.netmgt.telemetry.protocols.bmp.adapter.BmpPersistingAdapter
admin@sentinel> config:update

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

admin@opennms()> feature:install sentinel-core
admin@opennms()> feature:install sentinel-persistence (1)
admin@opennms()> feature:install sentinel-jms (2)
admin@opennms()> feature:install sentinel-blobstore-noop
admin@opennms()> feature:install sentinel-jsonstore-postgres
admin@opennms()> feature:install sentinel-telemetry-bmp-persist
1 needs datasource configuration. Refer to Sentinel Persistence for configuring datasource.
2 or sentinel-kafka. Refer to Sentinel Kafka for configuring Kafka on Sentinel.
When running kafka as broker, consumer config needs to have `auto.offset.reset=earliest`setting otherwise Bmp Adapter may miss some of the early messages like PeerUp notification which are essential for for proper BMP state.