Pre-Installation Tasks

This section describes the configuration tasks that you must complete before installing ALEC.

OpenNMS configuration

Before you install ALEC, you must configure your OpenNMS instance.

Set \$OPENNMS_HOME variable

The ALEC installation documentation refers to the $OPENNMS_HOME environment variable, which does not exist by default. To create it, use the command that is appropriate for your Linux distribution:

  • RHEL/CentOS: export OPENNMS_HOME=/opt/opennms

  • Ubuntu/Debian: export OPENNMS_HOME=/usr/share/opennms

Verify OpenNMS installation

Run opennms:health-check in an OpenNMS Karaf shell to verify the status of your Horizon or Meridian instance. If the command returns Everything is awesome, you can continue to Enable alarm history storage. If it returns Oh no, something is wrong, you must address the underlying problem before continuing.

The most common output that you may see involves a missing Elasticsearch configuration, similar to the following example:

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

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

=> Everything is awesome

OpenNMS deployments install the opennms-flows feature set by default, but may not automatically point to the Elasticsearch server. This does not cause the health check to fail, but you may want to configure the feature to point to an Elasticsearch instance:

config:edit org.opennms.features.flows.persistence.elastic
config:property-set elasticUrl http://elastic:9200 (1)
1 Replace the sample URL with one that points to your Elasticsearch instance.

Run opennms:health-check again. If the Everything is awesome message is displayed, continue to the next tasks.

Enable alarm history storage

When using ALEC, we strongly recommend that you leverage the OpenNMS-Elasticsearch integration. It lets OpenNMS maintain historical alarm information on an Elasticsearch server.

Follow these steps in an OpenNMS Karaf shell to set up the integration.

  1. Point your OpenNMS instance to an Elasticsearch instance:

    config:edit org.opennms.features.alarms.history.elastic
    config:property-set elasticUrl http://elastic:9200 (1)
    1 Replace the sample URL with one that points to your Elasticsearch instance.
  2. Install the alarm history feature:

    feature:install opennms-alarm-history-elastic
  3. Run opennms:health-check. If the alarm history feature is configured properly, Everything is awesome is displayed.

Enable syslogd

We recommend that you enable syslogd to take advantage of the syslog patterns and event definitions that ALEC provides.

Edit $OPENNMS_HOME/etc/service-configuration.xml and change the following code:

<service enabled="false">



This change occurs the next time OpenNMS restarts.

Do not restart OpenNMS at this point; you will restart it as part of the ALEC installation process.

Set up package repositories

Packages for ALEC are available in the same yum and apt repositories as OpenNMS. If you already have the stable repository installed, you can skip this step.

Install the repository using the commands that are appropriate for your system:

  • RHEL/CentOS:

    yum -y install
    rpm --import
  • Ubuntu/Debian:

    cat << EOF | sudo tee /etc/apt/sources.list.d/opennms.list
    deb stable main
    deb-src stable main
    wget -O- | tee -a /etc/apt/trusted.gpg.d/opennms.asc