Alibaba Cloud Prometheus
This topic describes how to integrate an Alibaba Cloud Prometheus monitoring source.
Introduction
Alibaba Cloud Prometheus Service is fully integrated with the open source Prometheus ecosystem. The Operations and Maintenance (O&M) Event Center allows for a simple and fast integration with Prometheus. This lets you manage all your alerts and events in one place. Follow the steps below to integrate your alert records.
Integrate Prometheus
Step 1: Find the Prometheus monitoring source
Log on to the O&M Event Center. In the navigation pane on the left, choose . Find the Prometheus monitoring source and open the page to add a new integration. Follow the on-screen instructions to complete the integration.
Step 2: Create a notification recipient
Log on to the Alibaba Cloud Prometheus Service. In the navigation pane on the left, choose .
Send a POST request to the following URL:
https://public-alert.aliyuncs.com/event/aliyun/prometheus/{IntegrationKey}
You can find the alert callback URL on the Add Prometheus Integration guide page. To navigate to this page, go to the O&M Event Center and choose in the navigation pane on the left.
Set the `Content-Type` header to `application/json`.
In the body, enter `{"content":"$content"}`. Clear the content in the recovery template.
Click Send Test. Confirm that the status code is 200 and the response body is "success".
Step 3: Create a notification policy
Log on to the Alibaba Cloud Prometheus Service. In the navigation pane on the left, choose . In step 3, set Notification Recipient to General Webhook and select the recipient that you configured with the webhook address.
Step 4: Create an alert rule
Go to . For Notification Policy, select the policy that you created.
Step 5: Verify the integration
In the Alibaba Cloud Prometheus Service console, choose in the navigation pane on the left. View the alert history to confirm that alerts are pushed to the O&M Event Center.
Configure alerting and push rules in Alibaba Cloud Prometheus Service, and then trigger an alert. Go to the Integration Configuration page in the O&M Event Center. If the status of the Alibaba Cloud Prometheus monitoring source is 'Received', the integration is successful.