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 between an event occurring on the DB and being published to kafka, in milliseconds. Note: since MySQL timestamps are accurate to the second, this is only accurate to +/- 500ms.|
||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|
||return all metrics as Prometheus format|
||run Maxwell's healthchecks. Considered unhealthy if >0 messages have failed in the last 15 minutes.|
||a simple ping test, responds with
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"