Skip to main content
Metrics are crucial analytical data for system observability. AutoMQ supports exposing various native Apache Kafka® Metrics data through Prometheus. This article outlines the details of the Metrics exposed by AutoMQ.

Metrics collection methods

AutoMQ supports Prometheus-compatible monitoring through the following methods:
  1. Remote Write: AutoMQ pushes metrics directly to a user-provided Prometheus Remote Write endpoint. Configure the endpoint and authentication when you create or update the instance.
  2. Exporter: AutoMQ exposes a Prometheus-compatible scrape endpoint that your monitoring system pulls.
Exporter service discovery depends on the deployment platform:
  • Kubernetes deployments: Discover the scrape endpoint by using standard Prometheus annotations on Kubernetes resources.
  • Virtual machine deployments: Discover the hosts by using the host tags provided by the cloud provider.
Both methods provide metrics collection and delivery. Configure dashboards and alerts in your Prometheus-compatible monitoring system. AutoMQ also provides Grafana dashboard templates and Prometheus alert rule templates.

Prometheus Metrics Definitions

For metric names, labels, and definitions, see Prometheus Metrics in the AutoMQ open-source documentation.

Grafana Dashboard Example

As mentioned above, AutoMQ Cloud does not offer managed Grafana dashboard services. Users can refer to the Grafana templates provided by AutoMQ to quickly configure dashboards. The related dashboard templates can be downloaded from this link. The pre-configured Grafana dashboard templates offer metric monitoring across different dimensions:
  • Cluster Overview: Provides cluster-level monitoring, including node count, data size, cluster traffic, etc. It also includes metric overviews for Topic, Group, and Broker dimensions and offers drill-down capabilities for detailed monitoring.
  • Broker Metrics: Offers broker-level monitoring, including connection count, partition count, node traffic, node requests, and more.
  • Topic Metrics: Provides topic-level metric monitoring, including message throughput, total data volume, partition count, and consumption latency.
  • Group Metrics: Delivers group-level metric monitoring, including consumption rate and consumption latency.

Business Monitoring and Alerts

After sending AutoMQ metrics to Prometheus, configure alerts for cluster capacity, topic writes, and consumer time lag according to your workload.

Kafka Cluster Alert Templates

These Prometheus alert templates cover cluster capacity, topic writes, and consumer freshness. Select the rules your applications need, then adjust the filters, thresholds, and duration to match the workload. Prometheus evaluates the rules; Alertmanager routes notifications. Confirm that your deployment exports the required metrics. Metrics and labels may vary by deployment and version. The examples assume job identifies a cluster. If job identifies a scrape target, use the label that identifies your cluster.

Prometheus rule examples

By default, the templates match all nonempty topics and consumer groups. Adjust the topic and group filters and comparison thresholds to match the resources and workload you want to monitor.
Check the expressions against your metrics before routing notifications. An absent metric or an unavailable yesterday value does not satisfy these comparisons; configure a separate missing-metrics alert if you need to monitor data collection.

Managed Connector Alert Templates

AutoMQ also provides a series of alert templates for Managed Connector scenarios to monitor Connector task status, resource usage, and data processing anomalies. The list of alert rule templates is as follows: A complete alert template YAML file can be found below for copying and importing.
When using the Managed Connector alert templates, replace <your-connect-instance-id> and <your-connector-name> with your actual Connect instance ID and Connector name.