Flow Datasource

General

Use the Flow Datasource to retrieve application- and conversation-related metrics derived from flow data stored by OpenNMS.

The query editor supports the following functions:

Category Name Description

Combine

topN

Limit the results to the Top N conversations/applications when sorted by total bytes.

Combine

includeOther

Combine and include other conversations/applications that fall outside of the Top N.

Filter

withExporterNode

Filter for flows related to the given exporter node.

Filter

withIfIndex

Filter for flows related to the given interface index.

Transform

toBits

Convert the values from bytes to bits.

Transform

perSecond

Convert the values to a per/second rate.

Transform

negativeEgress

Make the egress values negative.

Transform

negativeIngress

Make the ingress values negative.

Transform

asTableSummary

Generate a tabular summary instead of time series data.

Transform

combineIngressEgress

Sum ingress and egress values together.

Transform

onlyIngress

Only display ingress traffic.

Transform

onlyEgress

Only display egress traffic.

Transform

withGroupByInterval

Changes the resolution of the returned datapoints grouping by the given time interval (in the format of: 10s, 5m, 1h, etc.)

Template Queries

exporterNodesWithFlows

The exporterNodesWithFlows() query will return a list of nodes which have exported flow data to OpenNMS. The value of the template variable is the Node ID and the display text is the Node Label.

The exporters must be part of the node inventory in OpenNMS in order to be returned by this query.

For example, to query the exporters that have sent flows you can use the following expression:

exporterNodesWithFlows()

interfacesOnExporterNodeWithFlows

The interfacesOnExporterNodeWithFlows() query will return a list of interface indexes which are associated with one or more flows on the given node. The value of the template variable is the Interface Index and the display text is the Interface Name.

The available arguments are as follows:

Name Default Description

nodeCriteria

(none)

Node criteria (Node ID, or Node Foreign Souce and Node Foreign ID) of the node on which to enumerate the interfaces.

Assuming that the $node variable is populated with a value from the exporterNodesWithFlows query, you can use the following expression:

interfacesOnExporterNodeWithFlows($node)

To query a specific node by id, you can use an expression similar to:

interfacesOnExporterNodeWithFlows(123)

To query a specific node by foreign source and foreign id, you can use an expression similar to:

interfacesOnExporterNodeWithFlows(FS:FID)

dscpOnExporterNodeAndInterface

The dscpOnExporterNodeAndInterface() query will return a list of DSCP values which are used by one or more flows on the given node and interface and given time range. The query returns selection options for the found DSCP values and ip precedence groups that cover these values. Labels of selection options for DSCP codes are symbolic names for these DSCP codes followed by the corresponding number (if applicable).

The available arguments are as follows:

Name Default Description

nodeCriteria

(none)

Node criteria (Node ID, or Node Foreign Souce and Node Foreign ID) of the node on which to enumerate.

interface

(none)

Interface Index of the SNMP interface to enumerate.

from

(none)

Start time in epoche millis

to

(none)

End time in epoche millis

Assuming that the $node variable is populated with a value from the exporterNodesWithFlows query and that the $interface variable is populated with a value from the interfacesOnExporterNodeWithFlows($node) query, you can use the following expression:

dscpOnExporterNodeAndInterface($node, $interface, $__from, $__to)

Limitations

The flow datasource only supports a single query per panel.