This plugin was generated by the OPA archetype and is used as example project layout.
The generated plugin contains code examples to demonstrate how to create a:
- Karaf Shell Command (see StatsCommand & TopologyCommand)
- REST Endpoint (see WebhookHandler & WebhookHandlerImpl)
- Event Configuration Extension (see EventConfExtension)
- Alarm Lifecycle Listener (see AlarmForwarder)
Build and install the plugin into your local Maven repository using:
mvn clean install
From the OpenNMS Karaf shell:
feature:repo-add mvn:it.arsinfo.opennms.plugins/karaf-features/0.1.0-SNAPSHOT/xml
feature:install opennms-plugins-prometheusplugin
cp assembly/kar/target/opennms-prometheusplugin-plugin.kar /opt/opennms/deploy/
feature:install opennms-plugins-prometheusplugin
bundle:watch *
Once installed, the plugin makes the following Karaf shell commands available:
- opennms-prometheusplugin:stats
- opennms-prometheusplugin:push-topology
You can also access the REST endpoint mounted by the plugin at http://localhost:8980/opennms/rest/prometheusplugin/ping