Distributed Installation
A distributed installation runs ALEC as a service on top of Sentinel, an OpenNMS component that enables scalability for data processing.
| You must complete the pre-installation tasks on your OpenNMS server and set up the package repository on each Sentinel server before proceeding. |
Prerequisites
In addition to an OpenNMS instance that meets the system prerequisites, 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.
-
Use Kafka strategy for Sink API
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). |
-
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" -
Disable incremental alarm suppression:
echo 'suppressIncrementalAlarms=false' >> "$OPENNMS_HOME/etc/org.opennms.features.kafka.producer.cfg" -
Install the Kafka Producer feature when OpenNMS starts:
echo 'opennms-kafka-producer' > "$OPENNMS_HOME/etc/featuresBoot.d/kafka-producer.boot" -
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
-
Install the
opennms-alec-pluginpackage on your OpenNMS server as described in Basic Installation. -
Configure the distributed feature set, instead of the standalone one, 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 on each Sentinel server.
The Sentinel home directory is /opt/sentinel, so set SENTINEL_HOME first:
export SENTINEL_HOME=/opt/sentinel
-
Install the plugin package:
-
RHEL/CentOS:
yum -y install sentinel-alec-plugin -
Ubuntu/Debian:
apt install sentinel-alec-plugin
-
-
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" -
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. -
Configure ZooKeeper for distributed coordination:
echo 'connectString=127.0.0.1:2181' > "$SENTINEL_HOME/etc/org.opennms.features.distributed.coordination.zookeeper.cfg" -
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:
-
Restart OpenNMS and Sentinel.
-
Make sure that the required Kafka topics have been created (see Kafka topics). If Kafka producer is not enabled to send data for edges, alarmFeedback and alec-inventory, those topics must be created manually.
-
Run
opennms:health-checkin an OpenNMS Karaf shell to check the status of your OpenNMS Horizon or Meridian instance. -
Run
opennms:health-checkin a Sentinel Karaf shell to check the status of the Sentinel instance.-
Repeat this step for each Sentinel instance in your environment.
-
-
Run
opennms-alec:list-graphsin 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. |