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

# Influxdata

Sync Influxdata alert events to Flashduty via webhook to achieve automated alert noise reduction.

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

  ***

  You can obtain an integration push URL through either of these two methods:

  ### Using Private Integration

  Choose this simpler option when you don't need to route alert events to different channels.

  <details>
    <summary>Expand</summary>

    1. Go to the Flashduty console, select **Channel**, and enter a channel's details page
    2. Select the **Integrations** tab, click **Add Integration** to enter the integration page
    3. Choose **Influxdata** integration, click **Save** to generate a card
    4. Click the generated card to view the **push URL**, copy it for later use, and you're done
  </details>

  ### Using Shared Integration

  Choose this option when you need to route alerts to different channels based on the alert event payload.

  <details>
    <summary>Expand</summary>

    1. Go to the Flashduty console, select **Integration Center=>Alert Events** to enter the integration selection page
    2. Select **Influxdata** integration:
       * **Integration Name**: Define a name for this 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 Influxdata

***

Supports Influxdata versions 1.x \~ 2.x, with different configurations for each version as detailed below.

* [Version 2.x](#v2)
* [Version 1.x](#v1)

## I. Influxdata Configuration

<span id="v2" />

### Version 2.x

#### Step 1: Create Alert Channel

1. Log in to your `Influxdata` console and navigate to the `Alerts > Notification Endpoints` page.
2. Click `Create` to create an alert notification channel.
3. Select `HTTP` for `Destination` and enter `Flashduty` for `Name`.
4. Choose `POST` for `HTTP Method` and enter the integration push URL.

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

#### Step 2: Use the Channel Created in Step 1 in Notification Rules

1. Log in to your `Influxdata` console and navigate to the `Alerts > Notification Rules` page.
2. Click `Create` to create an alert notification rule.
3. Configure `About` and `Conditions` as needed.
4. Select `Flashduty` created in Step 1 for `Message`.

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

5. Done.

<span id="v1" />

### Version 1.x

<div class="md-block">
  1. Log in to your `Influxdata` console and navigate to the `Alerting > Alert Rules` page
  2. Click on the alert rule you want to synchronize events for, enter the `Alert Rule Builder` page to start editing the rule
  3. In the `Alert Handlers` section, select `Add Another Handler`, choose `post` type, and enter the integration push URL in `HTTP endpoint` as shown below:

  <img alt="drawing" width="600" src="https://download.flashcat.cloud/influxdb-alert-rule.png" />

  4. Click the `Save Rule` button to save. Wait for event triggering. If the latest event time is displayed in the integration list, the configuration is successful and events are being received
  5. Done
</div>

## II. Status Mapping

<div class="md-block">
  Mapping relationship between Influxdata alert events and Flashduty alert severity:

  | Influxdata | Flashduty | Status   |
  | ---------- | --------- | -------- |
  | CRITICAL   | Critical  | Critical |
  | WARNING    | Warning   | Warning  |
  | INFO       | Info      | Info     |
  | unknow     | Info      | Info     |
</div>
