A Spring Boot 3.5 application that bridges OpenNMS alarms to Prometheus Alertmanager, enabling unified alerting and visualization through Grafana.
This application subscribes to OpenNMS Kafka topics (alarms and nodes) and forwards alarm data to Prometheus Alertmanager. It enriches alerts with full OpenNMS node information, including custom metadata.
- Kafka Consumer: Subscribes to OpenNMS
alarmsandnodestopics - Protobuf Decoding: Parses GPB-encoded messages from OpenNMS
- Node Enrichment: Caches node data including custom metadata
- Alertmanager Integration: Forwards alarms via Alertmanager API v2
- Automatic Resend: Periodically resends active alerts
- Metrics Export: Prometheus metrics at
/actuator/prometheus
# Build
make oci
# Run with Docker Compose (full stack)
cd example/docker
docker compose up -dKey environment variables:
| Variable | Description | Default |
|---|---|---|
KAFKA_BOOTSTRAP_SERVERS |
Kafka brokers | localhost:9092 |
ALERTMANAGER_URL |
Alertmanager URL | http://localhost:9093 |
OPENNMS_URL |
OpenNMS URL | http://localhost:8980/opennms |
| Label | Source |
|---|---|
alertname |
Derived from UEI |
severity |
OpenNMS severity |
node_id, node_label |
Node info |
opennms_categories |
Node categories |
opennms_meta_* |
Custom metadata |
GET /api/v1/bridge/status- Bridge statusGET /api/v1/bridge/alarms- Active alarmsGET /api/v1/bridge/nodes- Cached nodesPOST /api/v1/bridge/alarms/resend- Force resend
To make a release the following steps are required:
- Set the Maven project version without -SNAPSHOT
- Make a version tag with git
- Set a new SNAPSHOT version in the main branch
- Publish a release
To help you with these steps you can run a make goal make release.
It requires a version number you want to release.
As an example the current main branch has 0.0.2-SNAPSHOT and you want to release 0.0.2 you need to run
make release RELEASE_VERSION=0.0.2The 0.0.2 version is set with the git tag v0.0.2. It will automatically set the main branch to 0.0.3-SNAPSHOT for the next iteration. All changes stay in your local repository. When you want to publish the new released version you need to run
git push # Push the main branch with the new -SNAPSHOT version
git push origin v0.0.2 # Push the release tag which triggers the build which publishes artifacts.Apache License 2.0