Synthetic MonitoringCustom Labels

Custom Labels

Synthetic monitoring allows you to define custom labels in your check definitions.

Custom Labels

Query Custom Labels

Custom labels are published as an info metric sm_check_info.

All custom labels are prefixed with label_ to make sure they don’t conflict with system defined labels.

e.g: sm_check_info{label_env="prod"} query will show you check details with env custom label.

Query Check Metrics with Custom Labels

We can use group_left to get custom labels with check metrics data.

For example, probe_duration_seconds * on(job, instance, probe) group_left(label_env) sm_check_info query will include label_env label in results.

You can then extend your query further, for example by filtering metrics using these labels probe_duration_seconds * on(job, instance, probe) group_left(label_env) sm_check_info{label_env="prod"}

Join on Custom Labels