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 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). |
-
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"
-
Edit
$OPENNMS_HOME/etc/org.apache.karaf.features.cfg
and addopennms-kafka-producer
to thefeaturesBoost
property. -
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.
-
Install the plugin package on your OpenNMS server:
yum -y install opennms-alec-plugin
-
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.
-
Install the plugin package on your Sentinel systems:
yum -y 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).
-
Run
opennms:health-check
in an OpenNMS Karaf shell to check the status of your OpenNMS Horizon or Meridian instance. -
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.
-
-
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. |