For example:

  1. Alert executed and action were triggered as a result -> the alert status is now “Firing”.
  2. Alert executed again and action should be triggered -> the action will be throttled.
  3. Alert executed and no action is required -> the alert status is now “Resolved”.
  4. Alert exectued and action were triggered -> the action is triggered

How to use

Add the following attribute to your action:

throttle:
    type: one_until_resolved

For example:

# Database disk space is low (<10%)
alert:
  id: service-is-up
  description: Check that the service is up
  steps:
    - name: service-is-up
      provider:
        type: python
        with:
          # any external libraries needed
          imports: requests
          code: requests.get("http://localhost:3000")
  actions:
    - name: trigger-slack
      throttle:
        type: one_until_resolved
      condition:
        - type: assert
          assert: "{{ steps.this.results.status_code }} == 200"