Manage Alerting

Update or insert a specific check rule (Prometheus alert rule) by origin or id

put/api/alerting/check-rules/{originOrId}

Request

  • Base URL: https://api.eu-west-1.aws.dash0.com
  • URL: https://api.eu-west-1.aws.dash0.com/api/alerting/check-rules/{originOrId}
  • Auth: none declared

Path parameters

originOrIdstring required

Check rule origin or id

Query parameters

datasetstring

Optional dataset to query across. Defaults to whatever is configured to be the default dataset for the organization.

Request body

datasetstring

Optional dataset to query across. Defaults to whatever is configured to be the default dataset for the organization.

idstring

User defined id for getting/updating/deleting the alert rule through the API.

namestring required

Human-readable and templatable name for the check. In Prometheus alerting rules this is called "alert".

expressionstring required

An editable PromQL expression that can leverage the complete Dash0 Query Language. It furthermore supports a variable called $__threshold.

  • $__threshold can be used as a placeholder for both the degraded and failed thresholds. The thresholds are defined in the thresholds field. When $__threshold is used in the expression, the thresholds field is required and at least one of the thresholds must be defined.

    Usage of $__threshold implies that the PromQL expression may have to be evaluated up to two times using the degraded threshold and critical threshold respectively.

  • Top-level AND statements are treated as enablement conditions that specify when the check should "be running", i.e., is active. The use-cases for enablement conditions are several, e.g., requiring a minimum amount of requests being served before triggering due to errors rates, maintenance windows or muted timeframes.

intervalstring
forstring
keep_firing_forstring
labelsobject

Label are key-value pairs that can be used to add additional metadata to a check. They map to Prometheus alerting rules' "labels" field.

enabledboolean

A boolean flag to enable or disable the check rule. When a check rule is disabled, it will not be evaluated, and no check evaluations will be created. This field is optional and defaults to true.

summarystring

Deprecated: use the "summary" annotation instead.

descriptionstring

Deprecated: use the "description" annotation instead.

keepFiringForstring

Deprecated: use "keep_firing_for" instead.

Response

Successful response in case the check rule was updated. The response contains the updated rule.

datasetstring

Optional dataset to query across. Defaults to whatever is configured to be the default dataset for the organization.

idstring

User defined id for getting/updating/deleting the alert rule through the API.

namestring required

Human-readable and templatable name for the check. In Prometheus alerting rules this is called "alert".

expressionstring required

An editable PromQL expression that can leverage the complete Dash0 Query Language. It furthermore supports a variable called $__threshold.

  • $__threshold can be used as a placeholder for both the degraded and failed thresholds. The thresholds are defined in the thresholds field. When $__threshold is used in the expression, the thresholds field is required and at least one of the thresholds must be defined.

    Usage of $__threshold implies that the PromQL expression may have to be evaluated up to two times using the degraded threshold and critical threshold respectively.

  • Top-level AND statements are treated as enablement conditions that specify when the check should "be running", i.e., is active. The use-cases for enablement conditions are several, e.g., requiring a minimum amount of requests being served before triggering due to errors rates, maintenance windows or muted timeframes.

intervalstring
forstring
keep_firing_forstring
labelsobject

Label are key-value pairs that can be used to add additional metadata to a check. They map to Prometheus alerting rules' "labels" field.

enabledboolean

A boolean flag to enable or disable the check rule. When a check rule is disabled, it will not be evaluated, and no check evaluations will be created. This field is optional and defaults to true.

summarystring

Deprecated: use the "summary" annotation instead.

descriptionstring

Deprecated: use the "description" annotation instead.

keepFiringForstring

Deprecated: use "keep_firing_for" instead.

Changes

No recorded changes to this operation across all 1 revision of this API.