Last active
August 9, 2019 11:53
-
-
Save brancz/81563d26b4dc55f5721f616a2f0d977e to your computer and use it in GitHub Desktop.
Example Prometheus config hashing the `job` label before sending it out via remote-write.
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
scrape_configs: | |
- job_name: "node" | |
scrape_interval: "1s" | |
static_configs: | |
- targets: ["localhost:9100"] | |
remote_write: | |
- url: "http://localhost:1234/receive" | |
write_relabel_configs: | |
- source_labels: ["job"] | |
action: "hashmod" | |
modulus: 18446744073709551615 # math.MaxUint64 causing us to never mod, and only hash the label value | |
target_label: "job" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment