====== Kafka plugin ====== ===== Purpose ===== * This plugin will post alarms and metrics to a Kafka node. * Different topics for alarms and metrics can be created to distribute the events and to facilitate the integration with third party consummers. * The Kafka plugin will flush received events every 30 seconds to the Kafka node. * If the node cannot be reached, events will be queued until connectivity is back or until queue is full. ---- ===== Create/Edit ===== * Press **Create** or select **Edit** in the table action menu to open the Kafka plugin editor * Set Kafka plugin parameter * Active * Title * Bootstrap servers * Client Id * Alarms topic * Metrics topic * User * Password * Properties * Max queue size * Send alarms * Send metrics {{..:settings:pasted:20210618-170643.png}} **Note:** If the alarm or metric queue is full, incoming events will be discarded until space is made in the queue. ---- ===== Topics ===== You can use variable names in topic to dynamically redirect the events into specific topics. You can use metric or alarm tag property names as variables: **Example:** Let's consider following metric: {"timestamp":1594742051,"value":4.0,"key":"sap.hana.HANA_THREADS.THREADS_COUNT","tags":{"instance":"aglgesrvhana02b","sid":"HA5","group":"Agentil"}} If you set **"metrics-%group%-%sid%"** in metric topic, this metric will be put in topic: **metrics-Agentil-HA5** ===== Properties ===== * Properties are key/value pairs separated by semicolon: ''val1=12;val2=no'' * The list of exhaustive properties can be found [[https://kafka.apache.org/25/javadoc/index.html?org/apache/kafka/clients/producer/KafkaProducer.html|here]] * **Default settings:** * Batch size is set to 500KB * Linger time is set to 10ms (Time to wait for new events before sending an incomplete batch) * Compression is OFF (see property //compression.type=gzip//) ===== Example ===== {{..:plugins:pasted:plugin_kafka.png}}