Maxwell exposes certain metrics through either its base logging mechanism, JMX, HTTP or by push to Datadog. This is configurable through commandline options
config.properties file. These can provide insight into system health.
At present certain metrics are Kafka-specific - that is, not yet supported other producers.
All metrics are prepended with the configured
||count of messages that were successfully sent to Kafka|
||count of messages that failed to send to Kafka|
||a count of rows that have been processed from the binlog. note that not every row results in a message being sent to Kafka.|
||a measure of the rate at which messages were successfully sent to Kafka|
||a measure of the rate at which messages failed to send Kafka|
||a measure of the rate at which rows arrive to Maxwell from the binlog connector|
||the time elapsed between the database transaction commit and the time it was processed by Maxwell, in milliseconds|
||the number of messages that are currently in-flight (awaiting acknowledgement from the destination, or ahead of messages which are)|
||the time it took to send a given record to Kafka, in milliseconds|
||the time it took to enqueue a given binlog event for processing, in milliseconds|
When the HTTP server is enabled the following endpoints are exposed:
||return all metrics as JSON|
||run Maxwell's healthcheck(s) and return success or failure based on the result|
||a simple ping test, responds with
/healthcheck endpoint will return unhealthy when there is more than 1 message that failed to be sent to Kafka in the past 15 minutes.
Standard configuration is either via commandline args or the
config.properties file. However, when exposing JMX metrics
additional configuration is required to allow remote access. In this case Maxwell makes use of the
JAVA_OPTS environment variable.
To make use of this set
JAVA_OPTS before starting Maxwell.
The following is an example which allows remote access with no authentication and insecure connections.
export JAVA_OPTS="-Dcom.sun.management.jmxremote \ -Dcom.sun.management.jmxremote.port=9010 \ -Dcom.sun.management.jmxremote.local.only=false \ -Dcom.sun.management.jmxremote.authenticate=false \ -Dcom.sun.management.jmxremote.ssl=false \ -Djava.rmi.server.hostname=SERVER_IP_ADDRESS"