Grpc Exporter
The Grpc Exporter feature allows Meridian to forward the status of all monitored services to external applications via the gRPC protocol.
These objects are encoded using Google Protocol Buffers (GPB).
See monitored-services.proto
in the corresponding source distribution for the model definitions.
Configure gRPC Exporter
$ ssh -p 8101 admin@localhost
...
admin@opennms()> config:edit org.opennms.features.grpc.exporter
admin@opennms()> config:property-set bsm.host bsm.onmshs.local:1443 (1)
admin@opennms()> config:property-set spog.host bsm.onmshs.local:1443 (1)
admin@opennms()> config:property-set tenant.id opennms-prime (2)
admin@opennms()> config:property-set tls.cert.path /opt/opennms/etc/tls.cert (3)
admin@opennms()> config:update
1 | Set the hostname of the external gRPC application. |
2 | Set tenant id for the data being sent, defaults to opennms-prime |
3 | Configure the path to the TLS certificate. |
Optional Configuration
$ ssh -p 8101 admin@localhost
...
admin@opennms()> config:property-set tls.enabled false (1)
admin@opennms()> config:property-set spog.enabled true (2)
admin@opennms()> config:property-set snapshot.interval 3600 (3)
admin@opennms()> config:property-set spog.alarms.export true (4)
admin@opennms()> config:property-set spog.events.export true (5)
admin@opennms()> config:property-set spog.inventory.export true (6)
1 | TLS is enabled by default. For testing purposes, it can be disabled by setting this value to false. |
2 | SPoG (Service Provider over gRPC) is enabled by default. For testing purposes, it can be disabled by setting this value to false. |
3 | Update the interval (in seconds) at which the complete snapshot of services will be sent to the gRPC server, defaults to 3600 secs. |
4 | SPoG alarms export is enabled by default. For testing purposes, it can be disabled by setting this value to false. |
5 | SPoG events export is enabled by default. For testing purposes, it can be disabled by setting this value to false. |
6 | SPoG inventory export is enabled by default. For testing purposes, it can be disabled by setting this value to false. |
Enable gRPC Exporter
Install the opennms-grpc-exporter
feature from the same shell using:
feature:install opennms-grpc-exporter
To ensure the feature is installed on subsequent restarts, add opennms-grpc-exporter
to a file in featuresBoot.d:
echo "opennms-grpc-exporter" | sudo tee ${OPENNMS_HOME}/etc/featuresBoot.d/grpc-exporter.boot