Last active
November 16, 2021 10:01
-
-
Save mrceperka/621e9cf703794e5088273fabd62e574f to your computer and use it in GitHub Desktop.
relabel prometheus job name
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: 'example_job' | |
scrape_interval: 5s | |
static_configs: | |
- targets: ['5s.example.com'] | |
# scrape more often, but keep same job name (example_job) | |
- job_name: 'example_job_each_1s' | |
scrape_interval: 1s | |
static_configs: | |
- targets: ['1s.example.com'] | |
relabel_configs: | |
- source_labels: [job] | |
target_label: "job" | |
replacement: "example_job" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment