Metric conditions
Alert rules for host metrics, such as "disk usage above 90% for 10 minutes". A condition applies to the hosts it names and to every host of the projects it names; when it holds for its duration, it raises an alert with its severity on the host.
List metric conditions
Returns the team's metric conditions, oldest first.
query Parameters
filter[host_id]Only conditions attached to this host directly (not through its project).
filter[project_id]Only conditions attached to this project.
pagePage number, from 1.
per_pageConditions per page, 1 to 100.
List metric conditions › Responses
Paginated set of MetricCondition
current_pagefirst_page_urlfromlast_page_urllast_pageGenerated paginator links.
next_page_urlpathBase path for paginator generated URLs.
per_pageNumber of items shown per page.
prev_page_urltoNumber of the last item in the slice.
totalTotal number of items being paginated.
Create a metric condition
Hosts and projects must belong to the team (422 otherwise). The condition is checked on
the next report of each host it applies to.
Create a metric condition › Request Body
metricThe metric to watch
How the metric's value is compared with threshold
thresholdCompared with the metric's value as the agent reports it, in the unit the host's charts show
severitySeverity of the alert it raises
critical Customers are affected right now. |
high Serious, needs attention soon. |
medium Should be looked at. |
low Informational. |
duration_minutesMinutes, 0 to 60, the condition must hold before the alert fires. Default 0: on the first breach
host_idsHosts of the team it applies to
project_idsProjects of the team whose hosts it applies to
Create a metric condition › Responses
The new metric condition.
idMetric condition ID
metricThe metric to watch
conditioncircularthresholdCompared with the metric's value as the agent reports it, in the unit the host's charts show (percent for cpu_usage, memory_usage and disk_usage)
duration_minutesMinutes the condition must hold before the alert fires; 0 fires on the first breach
severitySeverity of the alert it raises
critical Customers are affected right now. |
high Serious, needs attention soon. |
medium Should be looked at. |
low Informational. |
Hosts it applies to
Projects whose hosts it applies to
Get a metric condition
Returns the condition with the hosts and projects it applies to.
path Parameters
conditionMetric condition ID.
Get a metric condition › Responses
The metric condition.
idMetric condition ID
metricThe metric to watch
conditioncircularthresholdCompared with the metric's value as the agent reports it, in the unit the host's charts show (percent for cpu_usage, memory_usage and disk_usage)
duration_minutesMinutes the condition must hold before the alert fires; 0 fires on the first breach
severitySeverity of the alert it raises
critical Customers are affected right now. |
high Serious, needs attention soon. |
medium Should be looked at. |
low Informational. |
Hosts it applies to
Projects whose hosts it applies to