Distributed Installation

A distributed installation runs ALEC as a service on top of Sentinel, an OpenNMS component that enables scalability for data processing.

Network architecture graphic that displays the components of a distributed installation of ALEC
Figure 1. Example distributed installation network architecture


In addition to an existing instance of OpenNMS Horizon 30.0.1 or newer, these instructions assume that you have the following:

  • A Kafka broker (or cluster) running Kafka 0.11.x or greater.

  • One or more active Minions.

  • OpenNMS Sentinel.

    • Minions configured to use Kafka for the transport.

    • Minions ready to receive SNMP traps and Syslog messages.

  • ZooKeeper 3.5.10 or newer.

OpenNMS configuration

Complete the following steps in the OpenNMS Karaf shell. They configure your OpenNMS instance in preparation for a distributed installation of ALEC.

Configure Kafka Producer to point to your Kafka broker:
echo 'bootstrap.servers=' > "$OPENNMS_HOME/etc/org.opennms.features.kafka.producer.client.cfg"
Disable incremental alarm suppression:
echo 'suppressIncrementalAlarms=false' >> "$OPENNMS_HOME/etc/org.opennms.features.kafka.producer.cfg"

Open $OPENNMS_HOME/etc/org.apache.karaf.features.cfg in a text editor and add opennms-kafka-producer to the featuresBoot property.

Enable consumption of Kafka events:
echo 'org.opennms.netmgt.eventd.sink.enable=true' > "$OPENNMS_HOME/etc/opennms.properties.d/event-sink.properties"
This procedure assumes that you are already using the Kafka strategy for the Sink API (see Prerequisites).

Install ALEC in OpenNMS

You must complete the pre-installation tasks before proceeding with the installation.

Make sure that you install the package repository on all systems that are running Sentinel and OpenNMS.

Install the ALEC plugin package on your OpenNMS server:
yum -y install opennms-alec-plugin
Configure the feature set to be installed when OpenNMS starts:
echo 'alec-opennms-distributed wait-for-kar=opennms-alec-plugin' > "$OPENNMS_HOME/etc/featuresBoot.d/alec.boot"

Install ALEC in Sentinel

Install the ALEC plugin package on your Sentinel systems:
yum -y install sentinel-alec-plugin
Configure Kafka Stream (consumer):
echo 'bootstrap.servers=
commit.interval.ms=5000' > "$SENTINEL_HOME/etc/org.opennms.alec.datasource.opennms.kafka.streams.cfg"
Configure the Kafka producer:
echo 'bootstrap.servers=' > "$SENTINEL_HOME/etc/org.opennms.alec.datasource.opennms.kafka.producer.cfg"
Kafka Stream reads alarms and inventory, while the Kafka producer sends events.
Configure ZooKeeper for distributed coordination:
echo 'connectString=' > "$SENTINEL_HOME/etc/org.opennms.features.distributed.coordination.zookeeper.cfg"
Configure the feature set to be installed when Sentinel starts:
echo 'sentinel-core
alec-sentinel-distributed wait-for-kar=opennms-alec-plugin' >> "$SENTINEL_HOME/etc/featuresBoot.d/alec.boot"

Verify your installation

Follow these steps to verify your distributed ALEC installation:

  1. Restart OpenNMS and Sentinel.

  2. Make sure that the required Kafka topics have been created (see Kafka topics).

  3. Run the health:check command in an OpenNMS Karaf shell to check the status of your OpenNMS instance.

  4. Run the health:check command in a Sentinel Karaf shell to check the status of the Sentinel instance.

    • Repeat this step for each Sentinel instance in your environment.

  5. Run the opennms-alec:list-graphs command in a Sentinel Karaf shell to enumerate all available graphs.

At this point, the health check commands should return with no issues, and one graph named "dbscan" should be enumerated:

admin@opennms> opennms-alec:list-graphs
dbscan: 0 situations on 524 vertices and 4 edges.
Your graph may not have any situations, vertices, or edges at this point. This is normal during initial setup.