Dash0 acquires Polar Signals

Manage Recording Rules

Create a recording rule

post/api/recording-rules

Parameters 1

datasetquery

Target dataset. Overrides dash0.com/dataset in metadata.labels if both are provided.

References Dataset

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

stringpattern "^[a-zA-Z0-9_-]{3,26}$"
bash
Sample request
12345678910111213141516171819202122
curl --request POST 'https://api.eu-west-1.aws.dash0.com/api/recording-rules' \
--header "Authorization: Bearer ${DASH0_AUTH_TOKEN}" \
--header 'Content-Type: application/json' \
--data-raw '{
"apiVersion": "monitoring.coreos.com/v1",
"kind": "PrometheusRule",
"metadata": {
"name": "Example"
},
"spec": {
"groups": [
{
"name": "Example",
"rules": [
{
"expr": "up == 0"
}
]
}
]
}
}'

Request body required

References PrometheusRule

A resource following the monitoring.coreos.com/v1 PrometheusRule CRD format. A PrometheusRule contains one or more rule groups, each evaluated at a common interval. Groups may contain recording rules, alerting rules, or both.

PrometheusRuleApiVersionrequired

API version of the PrometheusRule CRD.

"monitoring.coreos.com/v1"
PrometheusRuleKindrequired

Kind of the PrometheusRule CRD.

"PrometheusRule"
PrometheusRuleMetadatarequired

Metadata for the PrometheusRule resource, following Kubernetes metadata conventions.

PrometheusRuleSpecrequired

Spec of the PrometheusRule resource containing rule groups.

Responses

The recording rule was created.

References PrometheusRule

A resource following the monitoring.coreos.com/v1 PrometheusRule CRD format. A PrometheusRule contains one or more rule groups, each evaluated at a common interval. Groups may contain recording rules, alerting rules, or both.

PrometheusRuleApiVersionrequired

API version of the PrometheusRule CRD.

"monitoring.coreos.com/v1"
PrometheusRuleKindrequired

Kind of the PrometheusRule CRD.

"PrometheusRule"
PrometheusRuleMetadatarequired

Metadata for the PrometheusRule resource, following Kubernetes metadata conventions.

PrometheusRuleSpecrequired

Spec of the PrometheusRule resource containing rule groups.