> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flashcat.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Huawei Cloud APM Alerts

> Sync Huawei Cloud APM alerts to Flashduty through webhook to achieve automatic alert noise reduction

Sync Huawei Cloud APM alerts to Flashduty through webhook, to achieve automatic noise reduction of alerts.

<div class="hide">
  ## In Flashduty

  ***

  You can get an integration push URL through the following 2 methods, choose one of them.

  ### Use dedicated integration

  When you don't need to route alerts to different channels, choose this method, it's simpler.

  <details>
    <summary>Expand</summary>

    1. Go to Flashduty console, select **Channels**, enter the details page of a channel
    2. Select the **Integrations** tab, click **Add Integration** to enter the integration page
    3. Select **Huawei Cloud APM** integration, click **Save** to generate a card
    4. Click the generated card to view the **push URL**, copy it for later use. Done.
  </details>

  ### Use shared integration

  When you need to route alerts to different channels based on alert payload information, this method is preferred.

  <details>
    <summary>Expand</summary>

    1. Go to Flashduty console, select **Integration Center=>Alerts** to enter the integration selection page
    2. Select **Huawei Cloud APM** integration:
       * **Integration Name**: Define a name for the current integration
    3. Configure the default route and select the corresponding channel (after the integration is created, you can go to `Route` to configure more routing rules)
    4. Click **Save** and copy the newly generated **push URL** for later use
    5. Done.
  </details>
</div>

## In Huawei Cloud

***

<div class="md-block">
  ## I. Huawei Cloud APM Alert Push Configuration

  ### Create Flashduty Alert Channel

  1. Log in to your Huawei Cloud Console, search for `SMN` (Simple Message Notification) service and enter its console
  2. Select `Topic Management=>Topics` from the left navigation bar
  3. Click `Create Topic`, enter `Flashduty` as the topic name in the edit page and confirm

  <img src="https://download.flashcat.cloud/flashduty/doc/en/hw/lts-1.png" alt="drawing" width="500" />

  4. Return to the topic list and click `Add Subscription` in the newly created Flashduty topic

  <img src="https://download.flashcat.cloud/flashduty/doc/en/hw/lts-2.png" alt="drawing" width="500" />

  5. In the edit page, select `HTTPS` as the protocol, enter the **push URL** as the subscription endpoint and confirm

  <img src="https://download.flashcat.cloud/flashduty/doc/en/hw/lts-3.png" alt="drawing" width="500" />

  6. After adding, check if the subscription status shows **Confirmed** in the subscription list

  <img src="https://download.flashcat.cloud/flashduty/doc/en/hw/lts-4.png" alt="drawing" width="500" />

  ### Configure Application Monitoring Alerts

  #### Step 1: Add Notification Configuration

  1. Log in to your `Huawei Cloud APM` console, under `Application Monitoring=>Metrics`, click `Notification`
  2. Select the corresponding region, click `Add`, and select the created `Flashduty` topic
  3. Click `Confirm` to complete the configuration

  <img alt="drawing" width="600" src="https://download.flashcat.cloud/flashduty/doc/en/hw/hw-apm-1.png" />

  #### Step 2: Create Alert Policy

  1. Under `Application Monitoring=>Metrics`, select your application and click the `Settings` button
  2. Select `Alarm Policy`, click `Add Custom Alarm Policy` or edit an existing alarm policy
  3. In the `Alarm Policy` edit page, configure alert metrics and conditions according to your business needs
  4. In `Notification Content`, when referencing variables, it's recommended to use K:V format for easier alert parsing, such as host:\${hostInfo}
  5. In `Notification Object`, select the created `Flashduty` notification channel
  6. Click `Confirm` to complete the configuration

  <img alt="drawing" width="600" src="https://download.flashcat.cloud/flashduty/doc/en/hw/hw-apm-2.png" />

  **Note:** The current integration configuration only supports application monitoring alerts, and does not fully support front-end monitoring, link tracking, and App monitoring alerts.
</div>

## II. Status Mapping

<div class="md-block">
  | Huawei Cloud APM | Flashduty | Severity |
  | ---------------- | --------- | -------- |
  | CRITICAL         | Critical  | Critical |
  | COMMON           | Info      | Info     |
</div>
