Skip to content

Instantly share code, notes, and snippets.

@brancz
Last active August 9, 2019 11:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brancz/81563d26b4dc55f5721f616a2f0d977e to your computer and use it in GitHub Desktop.
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.
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