After you configure the integration, Managed Service for Prometheus pulls performance metrics from RocketMQ message queues, enabling real-time monitoring and data analysis of their operational status.
Prerequisites
Container cluster
-
Activate Managed Service for Prometheus. For more information, see Prometheus instance billing.
-
Create a Kubernetes cluster. For more information, see Create an ACK managed cluster.
-
Activate Alibaba Cloud Resource Center. For more information, see Activate Resource Center.
ECS (VPC)
-
Managed Service for Prometheus is activated. Instance billing.
-
An ECS instance is created. Create and manage an ECS instance by using the ECS console (express version).
-
Resource Center is activated. Activate Resource Center.
Integrate RocketMQ
Log on to the Managed Service for Prometheus console. In the left-side navigation pane, click Integration Center.
-
Click the RocketMQ card and follow the on-screen instructions. Key parameters are described below.
Container cluster
Parameter
Description
RocketMQ address
The connection address of your RocketMQ instance. The format is
address:port. Use commas (,) to separate multiple addresses.NoteThe address field supports auto-completion for RocketMQ instances deployed in a Kubernetes cluster.
Username
The AccessKey of your RocketMQ instance.
Password
The SecretKey of your RocketMQ instance.
ECS (VPC)
Parameter
Description
RocketMQ address
The connection address of your RocketMQ instance. The format is
address:port. Use commas (,) to separate multiple addresses.NoteThe address field supports auto-completion for RocketMQ instances deployed in a Kubernetes cluster.
Username
The AccessKey of your RocketMQ instance.
Password
The SecretKey of your RocketMQ instance.
Custom labels
Add tags to the metrics of the ECS instance. Then, you can monitor, manage, query, or analyze the metric data in a fine-grained manner when you use tools such as Grafana. For more information, see Add custom tags to ECS instance metrics in a VPC.
NoteA tag key cannot contain special characters used in the Prometheus functionality, such as hyphens (-), periods (.), or percent signs (%).
Tags must be specified in the key-value format required by Prometheus.
View RocketMQ status
The installed component is displayed on the Integration Management page in the Managed Service for Prometheus console. The Integration Management page consists of the Integrated Environments, Integrated Addons, and Query Dashboards tabs, where you can view information such as targets, metrics, dashboards, and alerts.
Targets
You can view the list of targets discovered by the default integration job.
The Targets list shows the name and health status of each target. For example, 1/1 up indicates a healthy target, while 0/2 up indicates an unhealthy target and is displayed in red. You can use the All and Unhealthy filters at the top of the page to quickly find unhealthy targets.
Metric scraping
The Metric Scraping page allows you to view detailed metric information and configure which metrics to drop. For more information, see Configure dropped metrics. For a Prometheus instance in an ECS environment, the Custom Scraping sub-tab lets you create custom scraping tasks. A banner provides a View Configuration Example link for adding default scraping tasks, and you can click the Add button to create a custom one. Existing scraping tasks are listed with columns such as Name, Job Name, Component, Service Discovery Method (for example, kubernetes_sd_configs, aliyun_sd_configs, or static_configs), Scrape Path (default is /metrics), Scrape Interval (such as 15s or 30s), and Actions (Enable/Disable, View/Edit Configuration, Delete).
Dashboards
On this tab, click a dashboard name to view the corresponding Grafana dashboard.
The list of dashboards includes an entry named Cloud ROCKETMQ with the tags integration and RocketMQ.
Related documents
After integrating the component, you can configure alert rules for key metrics. This practice ensures that you can promptly detect and handle anomalies. For more information, see Create a Prometheus alert rule.