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
You must complete the pre-installation tasks before proceeding.

Prerequisites

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

Follow these steps to configure your OpenNMS instance for a distributed installation of ALEC. You should use the OpenNMS Karaf shell to complete these steps.

This procedure assumes that you are already using the Kafka strategy for the Sink API (see Prerequisites).
  1. Configure the Kafka Producer to point to your Kafka broker:

    echo 'bootstrap.servers=127.0.0.1:9092' > "$OPENNMS_HOME/etc/org.opennms.features.kafka.producer.client.cfg"
  2. Disable incremental alarm suppression:

    echo 'suppressIncrementalAlarms=false' >> "$OPENNMS_HOME/etc/org.opennms.features.kafka.producer.cfg"
  3. Edit $OPENNMS_HOME/etc/org.apache.karaf.features.cfg and add opennms-kafka-producer to the featuresBoost property.

  4. Enable consumption of Kafka events:

    echo 'org.opennms.netmgt.eventd.sink.enable=true' > "$OPENNMS_HOME/etc/opennms.properties.d/event-sink.properties"

Install ALEC in OpenNMS

Follow these steps to install ALEC on your OpenNMS instance. Make sure that you install the package repository on all systems that are running OpenNMS.

  1. Install the plugin package on your OpenNMS server:

    yum -y install opennms-alec-plugin
  2. Configure the feature set to install when OpenNMS starts:

    echo 'alec-opennms-distributed wait-for-kar=opennms-alec-plugin' > "$OPENNMS_HOME/etc/featuresBoot.d/alec.boot"

Install ALEC in Sentinel

Follow these steps to install ALEC on your Sentinel instance. Make sure that you install the package repository on all systems that are running Sentinel.

  1. Install the plugin package on your Sentinel systems:

    yum -y install sentinel-alec-plugin
  2. Configure Kafka Stream (the Kafka consumer):

    echo 'bootstrap.servers=127.0.0.1:9092
    commit.interval.ms=5000' > "$SENTINEL_HOME/etc/org.opennms.alec.datasource.opennms.kafka.streams.cfg"
  3. Configure the Kafka producer:

    echo 'bootstrap.servers=127.0.0.1:9092' > "$SENTINEL_HOME/etc/org.opennms.alec.datasource.opennms.kafka.producer.cfg"
    Kafka Stream reads alarms and inventory, while the Kafka producer sends events.
  4. Configure ZooKeeper for distributed coordination:

    echo 'connectString=127.0.0.1:2181' > "$SENTINEL_HOME/etc/org.opennms.features.distributed.coordination.zookeeper.cfg"
  5. Configure the feature set to install when Sentinel starts:

    echo 'sentinel-core
    sentinel-coordination-zookeeper
    alec-sentinel-distributed wait-for-kar=opennms-alec-plugin' >> "$SENTINEL_HOME/etc/featuresBoot.d/alec.boot"

Verify 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 opennms:health-check in an OpenNMS Karaf shell to check the status of your OpenNMS Horizon or Meridian instance.

  4. Run opennms:health-check 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 opennms-alec:list-graphs 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.