Integrated Alerting

Integrated Alerting lets you know when certain system events occur.

Caution Integrated Alerting is a technical preview and is subject to change.

To activate Integrated Alerting, select PMM→PMM Settings→Advanced Settings, turn on Integrated Alerting and click Apply changes.

Definitions

  • Alerts are generated when their criteria (alert rules) are met; an alert is the result of an alert rule expression evaluating to true.
  • Alert rules are based on alert rule templates. We provide a default set of templates. You can also create your own.

PMM’s Integrated Alerting is a customized and separate instance of the Prometheus Alertmanager, and distinct from Grafana’s alerting functionality.

Prerequisites

Set up a communication channel: When the Communication tab appears, select it. Enter details for Email or Slack. (Read more)

Open the Integrated Alerting page

  • From the left menu, select Alerting, Integrated Alerting

The Alerting menu also lists Alert Rules and Notification Channels. These are for Grafana’s alerting functionality.

This page has four tabs.

  1. Alerts: Shows alerts (if any).

  2. Alert Rules: Shows rule definitions.

  3. Alert Rule Templates: Lists rule templates.

  4. Notification Channels: Lists notification channels.

Add a Notification Channel

  1. On the Integrated Alerting page, go to the Notification Channels tab.

  2. Click Add.

  3. Fill in the details:

    • Name
    • Type
      • Email:
        • Addresses
      • Pager Duty
        • Routing key
        • Service key
      • Slack
        • Channel
  4. Click Add to add the notification channel, or Cancel to abort the operation.

Add an Alert Rule

  1. On the Integrated Alerting page, go to the Alert Rules tab.

  2. Click Add.

  3. Fill in the details

    • Template
    • Name
    • Threshold
    • Duration(s)
    • Severity
    • Filters
    • Channels
    • Activate
  4. Click Add to add the alert rule, or Cancel to abort the operation.

Add an Alert Rule Template

  1. On the Integrated Alerting page, go to the Alert Rule Templates tab.

  2. Click Add.

  3. Enter a template in the Alert Rule Template text box.

    ---
    templates:
        - name: mysql_too_many_connections
          version: 1
          summary: MySQL connections in use
          tiers: [anonymous, registered]
          expr: |-
            max_over_time(mysql_global_status_threads_connected[5m]) / ignoring (job)
            mysql_global_variables_max_connections
            * 100
            > [[ .threshold ]]
          params:
            - name: threshold
              summary: A percentage from configured maximum
              unit: '%'
              type: float
              range: [0, 100]
              value: 80
          for: 5m
          severity: warning
          labels:
            foo: bar
          annotations:
            description: |-
                More than [[ .threshold ]]% of MySQL connections are in use on {{ $labels.instance }}
                VALUE = {{ $value }}
                LABELS: {{ $labels }}
            summary: MySQL too many connections (instance {{ $labels.instance }})
    

    Alert Rule Template parameters

    The parameters used in the template follow a format and might include different fields depending on their type:

    • name (required): the name of the parameter. Spaces and special characters not allowed.
    • summary (required): a short description of what this parameter represents.
    • type (required): PMM currently supports the float type. (More will be available in the future, such as string or bool.)
    • unit (optional): PMM currently supports either s (seconds) or % (percentage).
    • value (optional): the parameter value itself.
    • range (optional): only for float parameters, defining the boundaries for the value.
  4. Click Add to add the alert rule template, or Cancel to abort the operation.

  • Page updated 2021-04-08

Contents

Previous page

User Interface

Next page

Query Analytics

Contact Us

For free technical help, visit the Percona Community Forum.
To report bugs or submit feature requests, open a JIRA ticket.
For paid support and managed or professional services, contact Percona Sales.