IReport and OpenNMS

From OpenNMS
Jump to: navigation, search

This Page will hold all contents related to OpenNMS and iReport.

Which version should I use?

In order to use iReport, you need to establish which version of Jasper Reports your OpenNMS installation is using. Look in the file for the jasperReportsVersion definition, it should look something like this:


Once you've established that you need the version of iReport corresponding to that defined. For OpenNMS 1.12.0 you'll need 3.7.6 which is available here.

  • OpenNMS 1.8.11 - 14.0.3 uses iReport v3.7.6
  • OpenNMS Meridian 2015 and Horizon 15+ uses Jaspersoft Studio v5.6.1

jRobin support

If you use iReport to build your Jasper report templates there is an easy way of adding this Jasper extension and fields provider to iReport to use within your template. You will need to add the 'jasper-extensions', 'jrobin-provider', 'jrobin', and 'org.opennms.core.lib' JARs to the classpath and set the query executer and fields provider.

Adding the JARs to the classpath

Under Preferences->Classpath (on Windows this is in Tools->Options->Classpath) click Add Jar and navigate to your ${OPENNMS_HOME}/lib directory and select the following .jar files:

  • jasper-extensions-{version num}.jar
  • jrobin-provider-{version num}.jar
  • jrobin-{version num}.jar
  • org.opennms.core.lib-{version num}.jar
  • opennms-util-{version num}.jar

The fields provider (jrobin-provider-{version num}.jar) is distributed separately from the rest of OpenNMS and may be downloaded from SourceForge. In my case I added jrobin-provider-1.0.jar.

Adding the Query Executer and Fields Provider

Under Preferences->Query Executer click 'Add'.

For language, type:


For Factory Class, type:


For the Fields Provider class, type:


Or, if using RRDTool instead of JRobin:

For language, type:


For Factory Class, type:


For the Fields Provider class, type:


Using Store By Group

If you are using storeByGroup you will need to set the the following report property in iReport's preferences.

org.opennms.rrd.storeByGroup=<true | false>

Depending on if you are using storeByGroup or not.

1.9 RrdTool Usage

As of this update you have a choice of either using the JRobinDataSource or the RrdToolDataSource, in version 1.9 or higher, when dealing with rrd data based Jasper reports. Simply change the query language from "jrobin" to "rrdtool". And add the following report properties to iReport in the preferences.

org.opennms.rrd.fileExtension=< .jrb | .rrd> The default value is .jrb

rrd.binary= <path to rrdtool binary>

RRDTool Query Executers

Under Preferences->Query Executer click 'Add', for language type 'rrdtool' and for Factory Class type 'org.opennms.netmgt.jasper.rrdtool.RrdtoolQueryExecutorFactory'. For the Fields Provider class, type 'org.opennms.netmgt.jasper.jrobin.JRobinFieldsProvider'.