Junos Telemetry Interface

The Junos Telemetry Interface (JTI) allows users to push operational statistics asynchronously to Meridian. Meridian sends a request to stream periodic updates once to the device. Data is generated as Google protocol buffers (GPB) structured messages over UDP. For detailed information about JTI, see the Juniper Documentation.

To enable support for JTI, edit ${OPENNMS_HOME}/etc/telemetryd-configuration.xml and set enabled=true for JTI protocol.

Enable JTI protocol in telemetryd-configuration.xml
<listener name="JTI-UDP-50000" class-name="org.opennms.netmgt.telemetry.listeners.simple.Udp" enabled="false">
    <parameter key="port" value="50000"/>

    <parser name="JTI-Parser" class-name="org.opennms.netmgt.telemetry.protocols.common.parser.ForwardParser" queue="JTI" />
</listener>

<queue name="JTI">
    <adapter name="JTI-GPB" class-name="org.opennms.netmgt.telemetry.protocols.jti.adapter.JtiGpbAdapter" enabled="false">
        <parameter key="script" value="${install.dir}/etc/telemetryd-adapters/junos-telemetry-interface.groovy"/>

        <package name="JTI-Default">
            <rrd step="300">
                <rra>RRA:AVERAGE:0.5:1:2016</rra>
                <rra>RRA:AVERAGE:0.5:12:1488</rra>
                <rra>RRA:AVERAGE:0.5:288:366</rra>
                <rra>RRA:MAX:0.5:288:366</rra>
                <rra>RRA:MIN:0.5:288:366</rra>
            </rrd>
        </package>
    </adapter>
</queue>

Apply the changes without restarting by sending a reloadDaemonConfig event in the CLI or the Web UI:

Send a reloadDaemonConfig event through CLI
$\{OPENNMS_HOME}bin/send-event.pl -p 'daemonName Telemetryd' uei.opennms.org/internal/reloadDaemonConfig

By default, this will open a UDP socket bound to 0.0.0.0:50000 to which JTI messages can be forwarded.

Configure JTI Listener on a Minion

To enable and configure a UDP listener for JTI on Minion, connect to the Karaf Console and set the following properties:

$ ssh -p 8201 admin@localhost
...
admin@minion()> config:edit --alias udp-50000 --factory org.opennms.features.telemetry.listeners
admin@minion()> config:property-set name JTI
admin@minion()> config:property-set class-name org.opennms.netmgt.telemetry.listeners.UdpListener
admin@minion()> config:property-set parameters.port 50000
admin@minion()> config:property-set parsers.0.name JTI
admin@minion()> config:property-set parsers.0.class-name org.opennms.netmgt.telemetry.protocols.common.parser.ForwardParser
admin@minion()> config:update
The protocol must also be enabled on Meridian for the messages to be processed.

JTI Adapter

The JTI adapter handles Junos Telemetry Interface payloads. Messages are decoded using the published protobuf specifications and forwarded to a JSR-223-compatible script (i.e., Beanshell or Groovy) for further processing. Use the script extension to extract the desired metrics from the JTI messages and persist the results as time series data.

Facts

Class Name

org.opennms.netmgt.telemetry.protocols.jti.adapter.JtiGpbAdapter

Parameters

Table 1. Adapter specific parameters for the JtiGpbAdapter
Parameter Description Required Default value

script

Full path to the script used to handle the JTI messages.

required

(none)

Scripting

The script will be invoked for every JTI message that is received and succesfully decoded.

The following globals will be passed to the script:

Table 2. Globals passed to the script
Parameter Description Type

agent

The agent (node) against which the metrics will be associated.

org.opennms.netmgt.collection.api.CollectionAgent

builder

Builder in which to add the resources and metrics.

org.opennms.netmgt.collection.support.builder.CollectionSetBuilder

msg

Decoded JTI message from which the metrics should be extracted.

org.opennms.netmgt.telemetry.adapters.jti.proto.TelemetryTop