The Event Forwarder (formerly known as the Elasticsearch REST plugin) forwards events to Elasticsearch. The events in Elasticsearch can then be used for indexing, long time archival, plotting with Grafana, and browsing with Kibana.
|If you use Kibana, make sure you are using the version that is compatible with your version of Elasticsearch.
The configuration is held in
Please refer to Configuring Elasticsearch for information on how to configure Elasticsearch connection settings.
Besides the general Elasticsearch connection settings, the following properties are supported to configure the Event Forwarder:
Whether to forward the event description field to Elasticsearch. It can be disabled as it contains a long text field that can be redundant with the rest of the metadata included in the event.
If changed to
Increase this value to enable batch inserts into Elasticsearch. This is the maximum size of a batch of events that is sent to Elasticsearch in a single connection.
The maximum time interval in milliseconds between batch events (recommended: 500ms) when using a
Once you are sure everything is correctly configured, you can activate the Event Forwarder by logging into the OSGi console and installing the feature:
ssh admin@localhost -p 8101
karaf> feature:install opennms-es-rest
It is possible to load historical Meridian events into Elasticsearch from the Meridian database using a Karaf Console command. The command uses the Meridian Events REST interface to retrieve a set number of historical events and forward them to Elasticsearch. Because we are using the REST interface, it is also possible to contact a remote Meridian and download its events into Elasticsearch by using the correct remote URL and credentials.
# open karaf command prompt using
# ssh -p 8101 admin@localhost
karaf> opennms:send-events-to-elasticsearch --username admin --password admin --url http://localhost:8980 --limit 10 --offset 0
For more details, consolidate the
--help option of the command.
The index names used to store the events use the following form:
Kibana Sense is a Kibana app that lets you run queries directly against Elasticsearch.
If you install Kibana Sense, you can use the following commands to view the events sent to Elasticsearch. You should review the https://www.elastic.co/guide/en/elasticsearch/reference/current/search.html) [Elasticsearch REST API documentation] to understand how to specify searches.
# Search all the events indexes
# Search all the raw events indexes
# Delete all the events indexes
# Get all the raw events indexes