Grafana provides an API key which gives access for 3rd party application like OpenNMS HORIZON. The Grafana Dashboard Box on the start page shows dashboards related to OpenNMS HORIZON. To filter relevant dashboards, you can use a tag for dashboards and make them accessible. If no tag is provided all dashboards from Grafana will be shown.

The feature is by default deactivated and is configured through opennms.properties. Please note that this feature works with the Grafana API v2.5.0.

01 grafana box
Figure 1. Quick access to Grafana dashboards from the OpenNMS HORIZON start page
Table 1. Grafana Dashboard configuration properties
Name Type Description Default

org.opennms.grafanaBox.show

Boolean

This setting controls whether a grafana box showing the available dashboards is placed on the landing page. The two valid options for this are true or false.

false

org.opennms.grafanaBox.hostname

String

If the box is enabled you also need to specify hostname of the Grafana server

localhost

org.opennms.grafanaBox.port

Integer

The port of the Grafana server ReST API

3000

org.opennms.grafanaBox.apiKey

String

The API key is needed for the ReST calls to work

org.opennms.grafanaBox.tag

String

When a tag is specified only dashboards with this given tag will be displayed. When no tag is given all dashboards will be displayed

org.opennms.grafanaBox.protocol

String

The protocol for the ReST call can also be specified

http

org.opennms.grafanaBox.connectionTimeout

Integer

Timeout in milliseconds for getting information from the Grafana server

500

org.opennms.grafanaBox.soTimeout

Integer

500

If you have Grafana behind a proxy it is important the org.opennms.grafanaBox.hostname is reachable. This host name is used to generate links to the Grafana dashboards.

The process to generate an Grafana API Key can be found in the HTTP API documentation. Copy the API Key to opennms.properties as org.opennms.grafanaBox.apiKey.