Fault and Performance API

Junos Space SDK uses OpenNMS REST APIs to provide fault and performance management capabilities for enterprise networks. OpenNMS is a highly scalable platform that can manage thousands of devices from a single server or from a cluster of servers. It can also configure and manage network devices without direct operator intervention. OpenNMS is an open-source platform written in Java.

The main features of OpenNMS are:

  • Data Collection—Collecting, storing, and reporting of various network available data points using SNMP.
  • Discovery—Finding equipment on your network and adding it to the database.
  • Event Management—Receiving, correlating, and sending notifications, such as alarm reduction and robust notification system with escalations.
  • Service Monitoring—Tracking the status of networked equipment, including monitoring modules and determining if network-based services (such as ICMP, HTTP, or DNS) are available.

Because Junos Space implements a single sign-on authentication scheme, the user name and password credentials you use to log into Junos Space also validate your use of OpenNMS. No separate authentication is needed.

Junos Space SDK and OpenNMS APIs

Junos Space SDK provides OpenNMS API support for network monitoring. You can access a subset of the full set of OpenNMS URLs using REST or by using other northbound interface (NBI) clients. The Junos Space Main UI already provides network monitoring functionality that uses OpenNMS for nodes, alarms, acknowledgement, and similar tasks.

How to Invoke Supported OpenNMS APIs

By default, OpenNMS support is not enabled in the Junos Space SDK because usually you do not need to invoke OpenNMS APIs in a production environment. Also, OpenNMS is not automatically configured and started for NAT-mode JSVA instances, which is the default mode for JSVA. However, OpenNMS is automatically configured and started for Bridged-mode JSVA instances.

To enable supported OpenNMS APIs in the Junos Space SDK, follow these steps:

Note: Before you begin, ensure your JSVA is running properly. For information about starting and stopping the JSVA, see Junos Space SDK Application Developer Guide.

  1. In the JSVA terminal window, log in as the admin user.
  2. At the Junos Space Settings Menu, choose option 7 to run a shell.
  3. Stop the JBoss service before starting OpenNMS with the following two service commands:
    service jmp-watchdog stop service jboss stop
  4. Run the OpenNMS installer to initialize the OpenNMS database by entering the following command:
    /opt/opennms/bin/install -dis
  5. Start the OpenNMS daemon:
    service opennms start
  6. Confirm that OpenNMS has completely started:
    service opennms status
  7. Restart JBoss:
    service jmp-watchdog start service jboss start

To see which specific OpenNMS subservices have started:

service opennms -v status

For more information on OpenNMS configuration, see the OpenNMS Quick Start Guide.

Note: In NAT mode, only HTTPS is available for calling OpenNMS APIs, not HTTP.

Media Types

OpenNMS APIs support the following media types:

  • application/xml
  • application/json

Note: APIs having "count" are exceptions because they return plain text only.

OpenNMS REST API Documentation

For complete information about RESTful interfaces for OpenNMS, see the OpenNMS ReST page at http://www.opennms.org/wiki/ReST.

Mapping Space Device IDs to OpenNMS Node IDs

To facilitate integration with other (foreign) sources, OpenNMS includes a mechanism to map its own native node IDs to other source IDs, such as device IDs, from Junos Space. When an OpenNMS node is defined, it specifies its own ID, which is used as an element in other OpenNMS APIs, such as those for acknowledgements or alarms.

In addition, the node definition defines attributes that label an equivalent foreign source and foreign ID. In the case of Junos Space, the foreignSource attribute is always defined with the value space and the foreignID attribute value is set as the Space device ID. For example:

<node type="A" id="4" label="192.168.1.1" foreignSource="space" foreignId="229388">
. . .
<node>

Use the space:foreignId syntax anywhere an OpenNMS node ID can be used.

Note: A colon separates the two Junos Space ID values. For example, if you are using the API with the example node defined above:

  /api/space/opennms/alarms/{id}

The id value can be the OpenNMS node ID (4) or the Space device ID (space:229388).

In addition, anywhere you use id in an OpenNMS REST API, you can alternatively use the foreign source and foreign ID separated by a colon. For example:

GET /nodes/space:<deviceID>

Resources: