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

Commit

Permalink
Add an example for additional_label option.
Browse files Browse the repository at this point in the history
  • Loading branch information
manugarg committed Oct 23, 2019
1 parent ee717b0 commit c38d6d6
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions examples/additional_label/cloudprober.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# You can add additional labels to the probe results using the probe field,
# "additional_label". An additional label's value can be static or it can be
# derived from the target labels.
#
# For the following config, probe results will look like the following:
# total{probe=google_com,ptype=http,src_zone=us-east1-c,env=prod}: 90
# success{probe=google_com,ptype=http,src_zone=us-east1-c,env=prod}: 80
probe {
name: "google_com"
type: HTTP
targets {
host_names: "www.google.com"
}
interval_msec: 5000
timeout_msec: 1000

additional_label {
key: "src_zone"
value: "{{.zone}}" # It will be replaced by GCE zone if running on GCE.
}

additional_label {
key: "env"
value: "prod"
}

http_probe {}
}

0 comments on commit c38d6d6

Please sign in to comment.