All Products
Search
Document Center

Application Real-Time Monitoring Service:Use the Prometheus AlertManager plug-in to display uncleared alerts in Grafana

Last Updated:May 17, 2024

The Prometheus AlertManager plug-in is integrated with the open source and standard interface /api/v2/alerts. You can use the plug-in to visualize ARMS alert events that have not been cleared or are being blocked in Grafana. This topic describes how to use the Prometheus AlertManager plug-in to connect a data source to Grafana.

Interface

For information about the /api/v2/alerts interface, see /api/v2/alerts.

Limits

The Grafana version must be 9.0.X or later.

Procedure

  1. Log on to the ARMS console. In the left-side navigation pane, choose Managed Service for Grafana > Workspace Management.

  2. On the Workspace Management page, find the workspace that you want to manage and click the URL in the URL column to go to Grafana.

    Note

    You can log on to Grafana with the administrator account of Grafana and the password that you configured when you created the workspace. You can also click Sign in with Alibaba Cloud to log on to Grafana with the current Alibaba Cloud account.

  3. In the left-side navigation pane of Grafana, choose 1DDD7C7A-A130-4BA5-9988-AFD1F3D1C577.png > Plugins. On the Plugins tab, search for and install the plug-in Prometheus AlertManager Datasource.image.png

  4. Log on to the ARMS console. In the left-side navigation pane, choose Alert Management > Alert Event Analysis.

  5. On the Alert Event Analysis page, click Obtain API Information. In the API Information dialog box, copy the JWT token.

    image.png

  6. In the left-side navigation pane, choose 1DDD7C7A-A130-4BA5-9988-AFD1F3D1C577.png > Data sources.

  7. On the Data sources tab, click Add data source and select Prometheus AlertManager.

  8. On the Settings tab, configure the data source of the Prometheus AlertManager Datasource plug-in.

    Note

    If the 403 error code is reported, ignore it. The error code does not affect the use of the plug-in.

    image.png

    1. Set the URL to https://alerts.aliyuncs.com.

    2. Click Add header. Set the Header field to Authorization and the Value field to Bearer {JWT Token}, for example, Bearer eywokxidngkTkd****.

      Note

      The JWT token is obtained in Step 5.

  9. After the configurations are complete, click Save & test.

  10. In the left-side navigation pane, choose lQLPJwldRqR8ax9CPLDPvpeWWJ1zuwWpUs_XukkA_60_66.png > +New dashboard. On the page that appears, click Add a new panel.

  11. On the Edit Panel page, set Visualization to Table on the right side, set the Data source field to Prometheus AlertManager, and then click Active to use the preceding data source to generate a table. For information about custom query statements, GitHub.image.png