Once JMX is enabled on Confluent Kafka Replicator side, Stream-JMX can communicate and retrieve it's metrics over JMX. Required parameters for communication are defined in connections stanza configuration file. Sample configurations are provided below.
##############################################################################################################################################################
{
confluent-replicator.vm: service:jmx:rmi:///jndi/rmi://172.16.31.163:9997/jmxrmi
# confluent-replicator.vm.user: admin
# confluent-replicator.vm.pass: admin
confluent-replicator.vm.reconnect.sec: 10
confluent-replicator.agent.options: *:*!!60000!!10
# confluent-replicator.agent.options: kafka.connect:*;confluent.replicator:*;java.lang:*;kafka.consumer:*;kafka.producer:*;kafka.admin.client:*!!60000!!10
confluent-replicator.source.fqn: SERVICE=@bean:kafka.connect:id=?,type=app-info#NETADDR=@sjmx.serverName#APPL=Kafka-Replicator
}
##############################################################################################################################################################
Description of each configuration property is as follows.
- confluent-replicator.vm :- This property defines the connection string that Stream-JMX uses to establish a connection to the Replicator instance over the JMX port. Host & port should be updated here.
- confluent-replicator.vm.user :- When enabling JMX on Replicator side and basic authentication is set to true, we need to pass credentials to make successful authentication. This property stores the basic authentication username.
- confluent-replicator.vm.pass :- Define the basic authentication password here.
- confluent-replicator.vm.reconnect.sec :- If the connection to the Replicator instance is lost, Stream-JMX retries to establish the connection based on the interval defined here.
- confluent-replicator.agent.options :- This property allows user to apply a filter to the list of mbeans/metrics that Stream-JMX collects. Using a wildcard (:) collects all metrics produced by the Replicator instance. If you only use a handful of metrics, collecting and publishing all metrics with a wildcard is not recommended in production environments. The sample above shows how to use filters. For more information on agent options, refer to section 3.4.2.1 of the AutoPilot M6 Plug-in for Kafka JMX Installation and User's Guide, available in the AutoPilotM6 Documentation Library.
- confluent-replicator.source.fqn :- This property defines the initial fact tree structure.
Screenshot below shows the metrics collected by Stream-JMX for Confluent Kafka Replicator.