{% extends layout %}{% import 'ui/kit.html' as kit %} {% block title %}amebo - thresholds{% endblock %} {% block content %}

Thresholds

A crossed threshold is published as an ordinary amebo event, so alert delivery is the same signed, retried, dead-letterable path as every other webhook. There is no second delivery system to operate.

{{ rules|length }}
rules
{{ breaching }}
breaching
{{ nsubs }}
subscribers
{% if flash %}{{ kit.flash(flash, tone) }}{% endif %}

How to receive these no new concepts

Subscribe an application to {{ breached_action }} the way you subscribe to anything else:

POST /v1/subscriptions
x-amebo-application: your-app
x-amebo-signature: <hmac-sha256 of the body with your secret>

{"subscription": "pagerduty-alerts",
 "application": "your-app",
 "action": "{{ breached_action }}",
 "handler": "/hooks/amebo-alerts",
 "max_retries": 5}

You then get everything the broker already does: a signed envelope, exponential backoff, dead-lettering when it is out of retries, and replay. An alert that never reached your pager is a row you can find on the Deliveries page, not a silence. Subscribe to {{ recovered_action }} for the all-clear.

{% if principal and principal.superadmin %}

New threshold

{% for s in services %}{% endfor %}

Minimum spans stops a rule firing on nothing: two requests can put p99 at ten seconds, and that is arithmetic rather than an incident. A rule fires once when it starts breaching and once when it recovers, never once per evaluation.

{% endif %}

Rules

{%- if not rules %}

No thresholds yet

A threshold publishes an ordinary amebo event when it is crossed, so any application can subscribe to it with POST /v1/subscriptions and get a signed, retried, dead-letterable webhook.

{%- else %} {% for r in rules %} {% endfor %}
rulewatchingconditionwindow currentstatechanged
{{ r.name }} {{ r.service }}{{ ' ' ~ r.route if r.route else ' (all routes)' }} {{ r.metric_label }} {{ r.comparator }} {{ r.threshold_text }} {{ r.window_text }} {{ r.value_text }} {% if not r.enabled %}paused{% elif r.state == 'breached' %}breaching{% else %}ok{% endif %} {{ r.last_change|ago }} {% if principal and principal.superadmin %} {% endif %}
{%- endif %}

Recent breaches these are events; click one for its full delivery timeline

{%- if not breaches %}

No threshold has been crossed.

{%- else %} {% for b in breaches %} {% endfor %}
what happenedactiondeliveredwhen
{%- endif %}
{% endblock %}