Metrics collection methods
AutoMQ supports Prometheus-compatible monitoring through the following methods:- 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.
- Exporter: AutoMQ exposes a Prometheus-compatible scrape endpoint that your monitoring system pulls.
- 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.
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
AutoMQ integrates with Prometheus to push metrics data to Prometheus. Users can then configure custom alert rules in Prometheus to monitor for anomalies such as business stress levels.Kafka Cluster Alert Templates
AutoMQ provides a series of alert templates based on high-frequency metrics usage in production environments. Users can choose and configure these alert rules according to their actual needs. The list of alert rule templates is as follows:
A complete alert template YAML file can be found below for copying and importing.
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.
Configuration Steps
AutoMQ provides the above Prometheus alert template. Users can import this alert template into their current Prometheus cluster (instance) and then configure custom alert rules based on the template. The following example uses Alibaba Cloud Prometheus to demonstrate the configuration method. If you are using a self-hosted Prometheus, adjust accordingly.Configuring Alerts in Alibaba Cloud Prometheus
- Import the alert template: Open the Alibaba Cloud Prometheus Console, go to Alert Rule Templates, and select Batch Import Template.

- Copy the content of the above template file and import it.

- Apply Alert Template: After importing the template, select the specific alert template and click Apply Template to apply the desired alert template to the corresponding Prometheus instance.

- Configure Monitoring and Alert Rules: Take the HighGroupConsumerLag alert as an example. After clicking “Apply Template,” select the corresponding Prometheus instance. Once applied successfully, you can see the enabled alert rules in the “Alert Rules List” on the left side.

- Click “Edit” to enter the alert rule editing page. Change “example_topic” and “example_group” to the topic and consumer group you want to monitor, and modify the alert threshold (10000 in the image below) to your desired value.

- Configure Notification Policy: After editing, select an existing notification policy or click “Create New Notification Policy” to create one.
- Quickly Copy Alert Policies (Optional): If you want to monitor multiple topics or consumer groups, you can click “Copy” to create multiple alert rules.