OpenNMS Time Series DB

The OpenNMS Time Series DB is a cloud-hosted service that provides a scalable time series database to store and persist performance metrics that Horizon collects from the devices it monitors.

Requirements

You must have the following to use the Time Series DB:

  • Horizon 31+ (Meridian availability with the 2023 release).

  • A Time Series DB subscription, which provides access to the OpenNMS Portal to retrieve your activation key and view Time Series DB metrics. Contact sales@opennms.com to sign up for the Time Series DB.

Deployment

There are four steps to set up the Time Series DB for your system:

  1. Update OpenNMS Cloud Services Connector files.

  2. Configure plugin settings.

  3. Obtain an activation key for the Cloud Services Connector.

  4. Enable cloud services connectivity.

Update OpenNMS Cloud Services Connector files

The OpenNMS Cloud Services Connector is an extension that lets a Horizon instance send time series data to the OpenNMS-hosted cloud service. The packages for this extension are installed by default in Horizon 31 and later, but do need to be configured and activated. You can use yum or apt to make sure the opennms-cloud-plugin package is up to date with the most current version of the plugin.

To ensure that the feature is activated on service restarts, add the feature to a file in featuresBoot.d:

echo "opennms-plugin-cloud-core wait-for-kar=opennms-plugin-cloud" | sudo tee ${OPENNMS_HOME}/etc/featuresBoot.d/plugin-cloud.boot

Configure OpenNMS Cloud Services settings

You will need to add settings to tell your Horizon instance to load the plugin on service start and to direct storage to the cloud service.

If you are running Horizon 31 or later, copy the example timeseries.properties file to your working directory:

cp ${OPENNMS_HOME}/etc/examples/opennms.properties.d/hosted_tsdb.timeseries.properties ${OPENNMS_HOME}/etc/opennms.properties.d/timeseries.properties

After the plugin is installed and configured, restart the Horizon service:

systemctl restart opennms

Obtain an activation key

The activation key lets Horizon connect with the Time Series DB cloud service. You must log in to the OpenNMS Portal to get this activation key, copy it, and then paste it into the appropriate screen in Horizon.

When you signed up for the Time Series DB, you received an activation email from OpenNMS with a login for the OpenNMS Portal. If you did not receive an activation email, contact your account manager.

The activation key is valid for one hour. If you do not use it within that time, you must log in to the OpenNMS Portal again, delete the instance, create a new instance, and generate a new key.

To obtain the activation key, follow these steps:

  1. If you have not already done so, activate your OpenNMS Portal account by clicking the Account Activation button in your welcome email.

  2. Sign in to the OpenNMS Portal with your username and password.

  3. Choose OpenNMS Core Instances in the left menu and click Add New.

  4. Type the name of your instance and click Generate Activation Key.

  5. Copy the activation key and click Save & Close.

Enable cloud services connectivity

To install the activation key on your Horizon instance, follow these steps:

  1. Log in to Horizon.

  2. Click Plugins  Cloud Services in the top menu bar.

  3. Turn the Cloud Services Deactivate toggle to on.

  4. Paste the key in the Enter Activation Key box and click Activate.

By default, collectd collects data every five minutes. You should see time series summary information in the OpenNMS Portal UI within 15 minutes. For more information on how to view this information, see View Time Series Summary Data. To change the data collection frequency, see Service configuration attributes.

Troubleshooting

To verify that your Time Series DB is set up correctly, run the health-check command in Karaf. You should see something like the following:

admin@opennms()> health-check
Verifying the health of the container

Verifying installed bundles                    [ Success  ]
Cloud status                                   [ Success  ] => Cloud status=SERVING
Connecting to ElasticSearch ReST API (Flows)   [ Success  ] => Not configured

=> Everything is awesome

Check the Karaf logs if the registration fails or the health check does not say SERVING. If this is the case, you will need to open a support ticket.

You can also check if the ${OPENNMS_HOME}/share/rrd files are still being updated. If they are not, this indicates that the Time Series DB is working.

View time series summary data

You can view time series summary data including health status, capacity, and metrics per second in the OpenNMS Portal. By default, the screen displays data for all OpenNMS instances you have configured to use the Time Series DB. You can filter to see data for a specific instance.

  1. Sign in to the OpenNMS Portal with your username and password.

  2. In the left menu, click Time Series.

  3. View the information.

  4. To see summary data for a specific instance, type an instance name in the Search Instances field.

    The screen updates to display only that instance and its associated summary data.