A new release of the OpenNMS Grafana Datasource, is available in OpenNMS’ stable repositories.

There are a few noteworthy changes in this release. For starters, we’re now compatible with Grafana v2.5.0 (there were some backwards incompatible changes that were made to their Plugin API).

We’ve also reworked the layout for query editor - the previous implementation suffered from some visual issues on narrow displays. Inspired by the InfluxDB query editor, the new layout looks like:

OpenNMS Query Editor

At the bottom of the editor, you’ll also find helpful notes related to using the datasource.

The update also includes support for a new Filter query type, for which support was added in OpenNMS 17.0.0. Filters are used to enhance, or alter the results returned by attribute, expression or previous filters queries. Some of the existing filters can be used to remove outliers, interpolate missing values, calculate trends and make forecasts. Additional filters can also be developed by implementating a simple interface.

Here we show an example of the Trend filter applied to the number of JVM threads:

Number of threads with trend line

Another noteworthy feature is static template support. If you have multiple systems, or interfaces for which you want to see the charts, you can reference these using variables.

For example, in the dashboard’s Templating section I’ve added a variable called nodes that has 3 values: ny-cassandra-1, ny-cassandra-2 and ny-cassandra-3:

Defining a template variable

In my query definition, I can now reference the $nodes variable in any attribute or expression query and have the query repeated for all of the selected nodes:

Using a template variable

Note that the variable name is also used in the query label, since the label must be unique.

Moving forward, we’re interesting in adding support for metric queries, where values for template variables could be the result of queries like: all nodes in categories ‘Web Server’ and ‘Production’.