Alibaba Cloud Prometheus

Updated at:

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 Integration Center > Integration Configuration. 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 Alert Management > Notification Recipient > Webhook Integration > New Webhook.

  1. Send a POST request to the following URL:

https://public-alert.aliyuncs.com/event/aliyun/prometheus/{IntegrationKey}   
Note

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 Integration Center > Integration Configuration > Prometheus > Add Integration in the navigation pane on the left.

  1. Set the `Content-Type` header to `application/json`.

  2. In the body, enter `{"content":"$content"}`. Clear the content in the recovery template.

  3. 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 Alert Management > Notification Policy > New Notification Policy. 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

  1. In the Alibaba Cloud Prometheus Service console, choose Alert Management > Alert Event History in the navigation pane on the left. View the alert history to confirm that alerts are pushed to the O&M Event Center.

  1. 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.