API reference
Alarm rules
The alarm catalogue: the rules an alarm can be based on, with their defaults.
Its operations need the scope alarms.view.
List the alarm rule catalogue
GET/v1/alarm-rules
Lists the rules an alarm can be based on, for one entity_type, with each rule’s slug, unit, comparison and default thresholds. Pass the slug as rule_slug when creating an alarm. domain_type, protocol, engines and os narrow the list to the rules a resource of that sub-type supports; without them every sub-type’s rules are listed, so read the catalogue with the resource’s sub-type before creating an alarm. is_default is true for a rule a new resource of the type gets by default when its server or profile has no alarm templates; it is false for every volume, port and unit rule, whose alarms are created by the agent’s reports. Pages by page and per_page (limit is the same as per_page); every page carries current_page, per_page, last_page and total.
Needs the scope alarms.view.
Query parameters
- entity_typestringRequired
The type of resource whose catalogue is read; required. The same nine values
GET /v1/alarmstakes.Values:domainserviceserverlog_sourcecustom_metricdatabase_instanceserver_portserver_system_serviceserver_volume(an open set: new values may be added) - domain_typestring or nullOptional
For
entity_type=domain, narrows the catalogue to the rules a domain of this type supports:apex,wildcardorsubdomain. Left out, every domain type’s rules are listed.Values:apexwildcardsubdomain(an open set: new values may be added) - protocolstring or nullOptional
For
entity_type=service, narrows the catalogue to the rules a service of this protocol supports. Left out, every protocol’s rules are listed.Values:httphttpstcpudpsmtp(an open set: new values may be added) - enginesarray of strings or nullOptional
For
entity_type=database_instance, the database’s engines: narrows the catalogue to the rules those engines support. A list: repeat the parameter (engines=mysql&engines=mariadb) or send one value (engines=mysql);engines[]=mysqlis accepted too.Values:mysqlmariadbpostgresql(an open set: new values may be added) - osstring or nullOptional
For a server’s rules and its volumes’, units’ and ports’:
linuxorwindows, narrows the catalogue to the rules a server of that operating system supports. Left out, both operating systems’ rules are listed.Values:linuxwindows(an open set: new values may be added) - limitinteger or nullOptional
The same as
per_page, kept for existing clients. - include_totalstring or nullOptional
Ignored:
totalis always present.Values:truefalse10(an open set: new values may be added) - per_pageinteger or nullOptional
The page size, from 1 to 100.
- pageinteger or nullOptional
The page to read, from 1; 1 when omitted. A page past the last answers no rows.
Returns
200 OK:
The rules of the entity type.
Each item of the page:
- rule_slugstring
The rule’s slug: pass it as
rule_slugto create an alarm. - namestring
The rule’s name.
- descriptionstring or null
The rule’s description; null when it has none.
- entity_typestring
The type of resource the rule is for.
- alarm_typestring or null
booleanorthreshold. - classificationstring
The rule’s classification: one of
operations,security,monitoring. - unitstring or null
The unit of the thresholds; null when the rule has none.
- comparison_operatorstring
How a reading is compared with the thresholds by default.
- warning_thresholdnumber or null
The default warning threshold; null when the rule has none.
- critical_thresholdnumber or null
The default critical threshold; null when the rule has none.
- warning_consecutive_failures_countinteger
The default number of consecutive evaluations before a warning.
- critical_consecutive_failures_countinteger
The default number of consecutive evaluations before a critical.
- consecutive_configurableboolean
Whether an alarm on this rule may set its own consecutive counts.
- supported_aggregationsarray of strings
The aggregations an alarm on this rule may use; empty when the rule takes none.
- supports_windowboolean
Whether an alarm on this rule may set a window.
- self_resolvingboolean
Whether an alarm on this rule clears itself when the condition ends (it sends no resolve notification).
- notify_on_acknowledgeboolean
Whether an alarm on this rule notifies when acknowledged, by default.
- notify_on_resolveboolean
Whether an alarm on this rule notifies when resolved, by default.
- applies_to_osstring
The operating system a server must run for this rule to apply:
linux,windows, oranyfor both and for every rule that is not a server’s. - is_defaultboolean
Whether a new resource of this type gets an alarm on this rule by default, when its server or profile has no alarm templates. False for every volume, port and unit rule.
Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.