The Trend feature visualizes small, inline charts of database-related statistics (nodes experiencing outages, unacknowledged alarms, and so on). Click Status  Trend in the top menu bar to view them.

Horizon UI displaying an example trend chart.
Figure 1. Example of a trend chart

You can define and configure trend charts in ${OPENNMS_HOME}/etc/trend-configuration.xml.

You can set trend charts to be displayed on the Horizon home page. To do this, modify the org.opennms.web.console.centerUrl parameter to include /trend/trend-box.htm.

The following code defines a trend chart that displays nodes that are experiencing ongoing outages:

<trend-definition name="nodes">
    <title>Nodes</title> (1)
    <subtitle>w/ Outages</subtitle> (2)
    <visible>true</visible> (3)
    <icon>fa-fire</icon> (4)
    <trend-attributes> (5)
        <trend-attribute key="sparkWidth" value="100%"/>
        <trend-attribute key="sparkHeight" value="35"/>
        <trend-attribute key="sparkChartRangeMin" value="0"/>
        <trend-attribute key="sparkLineColor" value="white"/>
        <trend-attribute key="sparkLineWidth" value="1.5"/>
        <trend-attribute key="sparkFillColor" value="#88BB55"/>
        <trend-attribute key="sparkSpotColor" value="white"/>
        <trend-attribute key="sparkMinSpotColor" value="white"/>
        <trend-attribute key="sparkMaxSpotColor" value="white"/>
        <trend-attribute key="sparkSpotRadius" value="3"/>
        <trend-attribute key="sparkHighlightSpotColor" value="white"/>
        <trend-attribute key="sparkHighlightLineColor" value="white"/>
    <descriptionLink>outage/list.htm?outtype=current</descriptionLink> (6)
    <description>${intValue[23]} NODES WITH OUTAGE(S)</description> (7)
    <query> (8)
            select (
                    count(distinct nodeid)
                    outages o, events e
                    e.eventid = o.svclosteventid
                    and iflostservice < E
                    and (ifregainedservice is null
                        or ifregainedservice > E)
            ) from (
                    now() - interval '1 hour' * (O + 1) AS S,
                    now() - interval '1 hour' * O as E
                    generateseries(0, 23) as O
            ) I order by S;
1 The title of the trend chart. See below for supported variable substitutions.
2 Subtitle of the trend chart. See below for supported variable substitutions.
3 The visible flag. This defines whether the chart is visible by default.
4 The icon for the chart. See Icons for options.
5 Attributes defining the inline chart. See jQuery Sparklines for options.
6 The description link.
7 The description text. See below for supported variable substitutions.
8 The SQL statement that queries the chart’s values.
We recommend that you set a limit for the SQL query’s return values. Allowing the query to fetch an unlimited number of results can increase its run time significantly.

You can use individual or aggregated values in the title, subtitle, and description fields. The following table describes available variable substitutions:

Name Description

Integer variables


Integer maximum value


Integer minimum value


Integer average value


Integer sum of values


An array of integer result values for the given SQL query.


An array of integer value changes for the given SQL query.


The last integer value


The last integer value change.

Double variables


Double maximum value


Double minimum value


Double average value


Double sum of values


An array of double result values for the given SQL query.


An array of double value changes for the given SQL query.


The last double value


The last double value change.

You can also display a single graph in your JSP files by including /trend/single-trend-box.jsp and specifying the name parameter.

Sample JSP snippet: include a single trend chart named example
<jsp:include page="/trend/single-trend-box.jsp" flush="false">
    <jsp:param name="name" value="example"/>