Skip to main content
Push Prometheus alert events to Flashduty through AlertManager using webhooks. When an alert is triggered, it sends a trigger event to Flashduty, and when the alert recovers, it sends a recovery event.

Requirements


In AlertManager

  • You must have permission to modify the AlertManager configuration file.
  • Your AlertManager server must be able to access api.flashcat.cloud domain to push alerts to the internet.

Supported Versions


This guide is compatible with Alertmanager 0.16.0 and above.

Setup Steps


In Flashduty

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

Using Private Integration

Choose this method when you don’t need to route alert events to different channels. It’s simpler.

Using Shared Integration

Choose this method when you need to route alert events to different channels based on the alert payload.

In AlertManager

Step 1: Configure Alertmanager

  1. Log in to your Alertmanager instance
  2. Locate and open the configuration file, typically alertmanager.yml in the Alertmanager deployment root directory
  3. In the receivers configuration section, add a Flashduty webhook type receiver as follows:
    receivers:
    - name: 'flashcat'
      webhook_configs:
      - url: '<Your Integration Push URL>'
        send_resolved: true
    
    
    Replace the url parameter value with your integration push URL, ensuring the integration_key is included in the query string parameters. If you need to request Flashduty through a proxy, you can additionally set the http_config proxy_url parameter:
    receivers:
    - name: 'flashcat'
      webhook_configs:
      - url: '<Your Integration Push URL>'
        send_resolved: true
        http_config:
        proxy_url: 'http://proxyserver:port'
    
    
  4. In the route configuration section, change the default route to specify the newly configured webhook receiver:
    config
    route:
      receiver: 'flashcat'
    
    If you don’t want to affect existing push channels, you can add the receiver to a route’s subroute:
    config
    route:
     receiver: 'feishu'
     - routes:
       receiver: 'flashcat'
    
  5. Save the configuration file
  6. Reload the configuration (by sending a SIGHUP signal to the process or POST request to /-/reload api)
  7. Done

Step 2: Configure Timestamp

By default, the system uses the current time as the event trigger time. If you want to customize the time, you can set an additional timestamp field to identify the exact time of each alert.
  1. Log in to your Prometheus Server instance
  2. Open the alert rules configuration file
  3. For each alert rule, modify the annotations section by adding a timestamp field:
    annotations:
      timestamp: '{{ with query "time()" }}{{ . | first | value }}{{ end }}'
      ...
    
  4. Save the configuration file
  5. Reload the configuration (by sending a SIGHUP signal to the process or POST request to /-/reload api)
  6. Done

Severity Mapping


The system extracts severity, priority, and level from alert event labels in that order. The corresponding value will be used as Prometheus’s own alert severity. If none are found, the system automatically sets the Prometheus alert severity to Warning. Prometheus to Flashduty severity mapping:
PrometheusFlashdutyStatus
criticalCriticalCritical
warningWarningWarning
warnWarningWarning
infoInfoInfo
acknowledgedInfoInfo
unknownInfoInfo
unkInfoInfo
okOkOk

FAQ