Menu
Grafana Cloud
Custom Labels
Synthetic monitoring allows you to define custom labels in your check definitions.
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"}
Related resources from Grafana Labs
Additional helpful documentation, links, and articles:

Getting started with your metrics, logs, and traces in Grafana Cloud
Learn to use the best open source observability software (Grafana, Prometheus, Loki, and Tempo) without the overhead of managing and scaling your own stack.

Kubernetes monitoring, out-of-the-box with Grafana Cloud
In this webinar you’ll learn how Grafana offers developers and SREs a simple and quick-to-value solution for monitoring their Kubernetes infrastructure.

Unify your data with Grafana plugins: Datadog, Splunk, MongoDB, and more
In this webinar, learn how to leverage Grafana's plugin ecosystem for access to 80+ data sources, including plugins for Datadog, Splunk, MongoDB, and more.