Enable the Kafka Producer

The Kafka Producer is disabled by default and can be enabled as follows.

First, log in to the Karaf shell of your Horizon instance and configure the Kafka client settings to point to your Kafka server(s). See Producer Configs for a complete list of available options.

Connect to Karaf shell
ssh -p 8101 admin@localhost
Configure the Kafka producer client
config:edit org.opennms.features.kafka.producer.client
config:property-set bootstrap.servers kafka-server-ip:9092 (1)
1 Set the Kafka server IP or hostname by replacing the kafka-server-ip and port of an existing Kafka cluster that you want to connect to. Add multiple hosts in a comma-separated list; for example, kafka-server-1:9092,kafka-server-2:9092

Next, install the opennms-kafka-producer feature from that same shell using:

feature:install opennms-kafka-producer

To ensure that the feature continues to be installed on subsequent restarts, add opennms-kafka-producer to a file in featuresBoot.d:

echo "opennms-kafka-producer" | sudo tee ${OPENNMS_HOME}/etc/featuresBoot.d/kafka-producer.boot