{% extends "base.html" %} {% block title %}Alerts - {{ project.name }} - hotato{% endblock %} {% block body %}

Alerts

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 %}{% endif %} {% if rules %}

Active rules

{% for r in rules %} {% endfor %}
IdWhenWindowChannelsCooldown
{{ 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
{% endif %}

Rules JSON

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.

Fetch from the monitor

curl -H "Authorization: Bearer $HOTATO_TOKEN" {{ base_url }}/api/v1/projects/{{ project.id }}/rules
{% endblock %}