Versions:

Alert in Promscale

Promscale supports alerting rules. It evaluates these rules at regular intervals. The Promscale connector can be used as the ruler while ingesting and querying the data. In Promscale, you can set the alerting rules similar to Prometheus rules configuration and publish the alerts to alertmanager.

Alert manager

The alert manager manages alerts, including silencing, inhibition, and aggregation. It also sends out notifications using email, on-call notification systems, and chat platforms. The labels, summary, and description described in the alerting rules file is forwarded to the alert manager on meeting the PromQL alert expression.

To set up alerting and notifications, you need to:

  1. Setup and configure the alert manager
  2. Configure Promscale to talk to the alert manager
  3. Create alerting rules in Promscale

For more details about the alertmanager tool, see the alert manager documentation.

Set alerting rules

Promscale alerting rules are compatible with Prometheus alerting rules capabilities. Alerting rules are written in one or multiple YAML files. Promscale evaluates these conditional rules. The alerting rules are used to trigger alerts when there is a violation of pre-defined conditions. Alert notifications can be sent through different communication channels like Slack or email can receive these alerts.

Setting alerting rules

  1. Create a YAML file that contains the configuration for each alert similar to:

    groups:
     - name: <alert-group-name>
       rules:
       - alert: <alert-name>
         expr: <promql_expression>
         for: <time-interval for how long this to happen to happen to fire an alert>
         labels:
           <key>:<value>
         annotations:
         summary: <text>
         description: <description on alert>
  2. Create another file that lists all rules YAML files as well as global configuration parameters:

    global:
       evaluation_interval: 10s
    
    rule_files:
      - "<alert-rules-file>"
    
    #AlertManager client configuration to publish alerts
    alerting:
      alertmanagers:
      - static_configs:
        - targets:
        - localhost:9093
  3. Pass this configuration file to Promscale when you start the service, using the -metrics.rules.config flag.

For more information about alerting, see Prometheus alerting. For specific information about alerting rules, see Prometheus alerting rules.

Found an issue on this page?

Report an issue!

Keywords

Related Content