Monitoring
Logging
The connectors make use of SLF4J for logging integration. The loggers use the names org.init.ohja.kafka.connect.odatav4.source
and org.init.ohja.kafka.connect.odatav4.sink
and can be configured, e.g. in the log4j configuration properties within the 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 V4 Connectors support all the connector and task metrics provided by Kafka Connect through Java Management Extensions (JMX). In addition, the OData V4 Connectors provide extra JMX metrics for accessing state managed by the connector.
Source Connector
MBean: org.init.ohja.kafka.connect:type=odatav4-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. |
${configGroup}-service | Service path (root) for OData V4 service configured in the configuration group. |
${configGroup}-entityset | Name of the OData entity set for OData V4 service configured in the configuration group. |
${configGroup}-topic | Name of target topic for OData V4 service configured in the configuration group. |
${configGroup}-service-url | Service url of current data extraction for OData V4 service configured in the configuration group. |
${configGroup}-uri-type | URI type of current data extraction for OData V4 service configured in the configuration group. |
${configGroup}-position | Record position of current data extraction for OData V4 service configured in the configuration group. |
Sink Connector
MBean: org.init.ohja.kafka.connect:type=odatav4-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 V4 service configured in the configuration group. |
${configGroup}-entityset | Name of the OData entity set for OData V4 service configured in the configuration group. |
${configGroup}-topic | Name of the source topic for OData V4 service configured in the configuration group. |