{% extends "base.html" %} {% block title %}Alerts - {{ project.name }} - hotato{% endblock %} {% block body %}
Rules the production monitor fetches and applies to each scored call.
{% if saved %}Rules saved. The monitor picks them up on its next fetch.
{% endif %} {% if error %}{{ error }}
{% endif %} {% if rules %}| Id | When | Window | Channels | Cooldown |
|---|---|---|---|---|
| {{ r.id }} | {% if r.when.metric is defined %}{{ r.when.metric }} {{ r.when.op }} {{ r.when.value }}{% else %}{{ r.when.incident_type }} at {{ r.when.severity_at_least }} or worse{% endif %} | {% if r.window %}{{ r.window.min_hits }} of the last {{ r.window.calls }} calls{% else %}every call{% endif %} | {{ r.channels|join(', ') or '-' }} | {{ r.cooldown_min }} min |
Each rule has an id, a condition (a metric comparison, or an incident type at a minimum severity), an optional window of calls, channels (slack, pagerduty, webhook) and a cooldown in minutes.
curl -H "Authorization: Bearer $HOTATO_TOKEN" {{ base_url }}/api/v1/projects/{{ project.id }}/rules