Grafana Dashboard Box

Grafana provides an API key that lets third-party applications access it. Horizon uses Grafana to generate visualizations, including the Grafana Dashboard Box on the home page. By default, it shows a set of dashboards related to Horizon and your monitored environment.

01 grafana box
Figure 1. Grafana dashboards on the Horizon home page

Filter dashboards

To filter for relevant dashboards, you can use a dashboard’s tag (defined by the org.opennms.grafanaBox.tag property) and make it accessible. If no tag is provided, all Grafana dashboards are shown.

You can configure this feature by creating or editing ${OPENNMS_HOME}/etc/opennms.properties.d/grafana.properties.

Table 1. Grafana Dashboard Box configuration properties
Name Description Type Default

org.opennms.grafanaBox.show

Determines whether a Grafana Dashboard Box showing the available dashboards is included on the home page.

Boolean

false

org.opennms.grafanaBox.hostname

The hostname of the Grafana server. You may need to use the IP address or fully qualified domain name, based on your DNS records.

String

localhost

org.opennms.grafanaBox.port

The port for the Grafana server’s REST API.

Integer

3000

org.opennms.grafanaBox.basePath

The base path to Grafana.

String

Empty string

org.opennms.grafanaBox.apiKey

The Grafana API key. This key is needed for REST calls to work.
Refer to the official Grafana HTTP documentation for details on generating an API key.

String

Empty string

org.opennms.grafanaBox.tag

A tag that specifies which dashboards to display in the Grafana Dashboard Box. The tag must be assigned to an existing dashboard for it to be included.
When no tag is specified, all dashboards are displayed.

String

Empty string

org.opennms.grafanaBox.protocol

The protocol for the REST call.

String

http

org.opennms.grafanaBox.connectionTimeout

Connection timeout, in milliseconds, for fetching information from the Grafana server.

Integer

500

org.opennms.grafanaBox.soTimeout

Socket timeout, in milliseconds.

Integer

500

org.opennms.grafanaBox.dashboardLimit

The maximum number of entries to display. Setting the value to 0 will display an unlimited number of entries.

Integer

0

org.opennms.grafanaBox.link.protocol

The protocol used to build each dashboard URL.

String

org.opennms.grafanaBox.protocol

org.opennms.grafanaBox.link.hostname

Hostname used to build each dashboard URL.

String

org.opennms.grafanaBox.hostname

org.opennms.grafanaBox.link.port

The port used to build each dashboard URL.

Integer

org.opennms.grafanaBox.port

org.opennms.grafanaBox.link.basePath

The Grafana base path used to build each dashboard URL.

String

org.opennms.grafanaBox.basePath

If you have Grafana set up behind a reverse proxy, you may need to define the org.opennms.grafanaBox.link.* properties. The link.* properties, if defined, are used to build the user-facing URLs, independent of other properties that are used for internal interaction with the Grafana REST API.