Skip to content
This repository was archived by the owner on Nov 5, 2021. It is now read-only.

Commit c38d6d6

Browse files
committed
Add an example for additional_label option.
1 parent ee717b0 commit c38d6d6

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# You can add additional labels to the probe results using the probe field,
2+
# "additional_label". An additional label's value can be static or it can be
3+
# derived from the target labels.
4+
#
5+
# For the following config, probe results will look like the following:
6+
# total{probe=google_com,ptype=http,src_zone=us-east1-c,env=prod}: 90
7+
# success{probe=google_com,ptype=http,src_zone=us-east1-c,env=prod}: 80
8+
probe {
9+
name: "google_com"
10+
type: HTTP
11+
targets {
12+
host_names: "www.google.com"
13+
}
14+
interval_msec: 5000
15+
timeout_msec: 1000
16+
17+
additional_label {
18+
key: "src_zone"
19+
value: "{{.zone}}" # It will be replaced by GCE zone if running on GCE.
20+
}
21+
22+
additional_label {
23+
key: "env"
24+
value: "prod"
25+
}
26+
27+
http_probe {}
28+
}

0 commit comments

Comments
 (0)