Monitoring
Logging
The connectors make use of SLF4J for logging integration. The loggers use the logger names org.init.ohja.kafka.connect.odatav2.source
and org.init.ohja.kafka.connect.odatav2.sink
and can be configured, e.g. in the log4j configuration properties within Confluent Platform.
The connector provides additional log location information ohja.location
using MDC (mapped diagnostic context). The log location contains the name of the nearest enclosing definition of val, class, trait, object or package and the line number.
Example Log4j 1.x appender:
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[%d] %p %X{connector.context}%m %X{ohja.location}%n
If using the Confluent Platform, the logs can be seen by running a CLI command:
confluent local services connect log
For additional details check out the official tutorial.
JMX Metrics
The OData V2 Connectors supports all the connector and task metrics provided by Kafka Connect through Java Management Extensions (JMX). In addition, the OData V2 Connectors provides extra JMX metrics for accessing state managed by the connector.
Source Connector
MBean: org.init.ohja.kafka.connect:type=odatav2-source-task-metrics,connector=([-.w]+),task=([d]+)
Metric | Explanation |
---|---|
retries | Count of retries performed in the connector task that is in retrying state. |
last-extraction | Timestamp for last execution time of poll function in connector task. |
active-subscriptions | Number of active subscriptions registered by the connector. |
${configGroup}-service | Service path (root) for OData V2 service configured in the configuration group. |
${configGroup}-entityset | Name of the OData entity set for OData V2 service configured in the configuration group. |
${configGroup}-topic | Name of target topic for OData V2 service configured in the configuration group. |
${configGroup}-service-url | Service url of current data extraction for OData V2 service configured in the configuration group. |
${configGroup}-uri-type | URI type of current data extraction for OData V2 service configured in the configuration group. |
${configGroup}-position | Record position of current data extraction for OData V2 service configured in the configuration group. |
Sink Connector
MBean: org.init.ohja.kafka.connect:type=odatav2-sink-task-metrics,connector=([-.w]+),task=([d]+)
Metric | Explanation |
---|---|
retries | Count of retries performed in the connector task that is in retrying state. |
next-retry | Timestamp for next retry performed in the connector task that is in retrying state. |
${configGroup}-service | Service path (root) for OData V2 service configured in the configuration group. |
${configGroup}-entityset | Name of the OData entity set for OData V2 service configured in the configuration group. |
${configGroup}-topic | Name of source topic for OData V2 service configured in the configuration group. |