Distributed Installation
A distributed installation runs ALEC as a service on top of Sentinel, an OpenNMS component that enables scalability for data processing.
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
Complete the following steps in the OpenNMS Karaf shell. They configure your OpenNMS instance in preparation for a distributed installation of ALEC.
echo 'bootstrap.servers=127.0.0.1:9092' > "$OPENNMS_HOME/etc/org.opennms.features.kafka.producer.client.cfg"
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.
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.
yum -y install opennms-alec-plugin
echo 'alec-opennms-distributed wait-for-kar=opennms-alec-plugin' > "$OPENNMS_HOME/etc/featuresBoot.d/alec.boot"
Install ALEC in Sentinel
yum -y install sentinel-alec-plugin
echo 'bootstrap.servers=127.0.0.1:9092
commit.interval.ms=5000' > "$SENTINEL_HOME/etc/org.opennms.alec.datasource.opennms.kafka.streams.cfg"
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. |
echo 'connectString=127.0.0.1:2181' > "$SENTINEL_HOME/etc/org.opennms.features.distributed.coordination.zookeeper.cfg"
echo 'sentinel-core
sentinel-coordination-zookeeper
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:
-
Restart OpenNMS and Sentinel.
-
Make sure that the required Kafka topics have been created (see Kafka topics).
-
Run the
health:check
command in an OpenNMS Karaf shell to check the status of your OpenNMS instance. -
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.
-
-
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. |