This repository has been archived by the owner on Nov 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an example for additional_label option.
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 {} | ||
} |