SixthSense agent will remotely monitor Kafka i.e. the agent will run as a separate process and will connect to the JMX port exposed by Kafka for fetching the metrics. Below are the steps to enable Kafka monitoring:
Enabling remote JMX support in Kafka through environment variables/JVM args.
(optional) Enabling authentication on the port exposed by Kafka for JMX remote monitoring.
JMX remote support can be enable through environment variable or JVM args:
a. Need to pass com.sun.management.jmxremote as true in order to enable JMX remote support. Following are the other mandatory JVM arguments for configuring JMX remote. These JVM arguments will be picked by Kafka after restart.
Navigate to agent.config file i.e. Agent folder/config/agent.config file. The agent can be configured by adding the information in the agent.config file.
Following is a agent.config file section where brokers, producers, consumers and JMX host and port details must be updated:
Broker configuration
brokerConfigs:
-brokerUrl: ${SS_BROKER1_URL:localhost}
name: ${SS_BROKER1_URL:broker1}
brokerPort: ${SS_BROKER1_PORT:1100}
username: ${SS_BROKER1_USERNAME:}
password: ${SS_BROKER1_PASSWORD:}
configType: ${SS_CONFIG_TYPE:kafkabroker}
Producer configuration
-brokerUrl: ${SS_BROKER1_URL:localhost}
name: ${SS_BROKER1_URL:producer1}
brokerPort: ${SS_BROKER1_PORT:1200}
username: ${SS_BROKER1_USERNAME:}
password: ${SS_BROKER1_PASSWORD:}
configType: ${SS_CONFIG_TYPE:kafkaproducer}
Consumer configuration
-brokerUrl: ${SS_BROKER1_URL:localhost}
name: ${SS_BROKER1_URL:consumer1}
brokerPort: ${SS_BROKER1_PORT:1300}
username: ${SS_BROKER1_USERNAME:}
password: ${SS_BROKER1_PASSWORD:}
configType: ${SS_CONFIG_TYPE:kafkaconsumer}
Following is the section of agent.config file where agent general configuration must be updated.