Created
July 31, 2019 06:07
-
-
Save weibeld/7ccc448a9ea000f23e4b83012671f2d0 to your computer and use it in GitHub Desktop.
Example Prometheus configuration (scrape config)
This file contains hidden or 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
global: | |
scrape_interval: 10s | |
scrape_configs: | |
- job_name: node | |
static_configs: | |
- targets: | |
- localhost:9100 | |
- job_name: python-app | |
static_configs: | |
- targets: | |
- localhost:8000 | |
labels: | |
my_new_target_label: foo | |
- job_name: go-app | |
file_sd_configs: | |
- files: | |
- filesd.yaml | |
relabel_configs: | |
- target_label: instance | |
replacement: foo | |
- job_name: ec2_instances | |
ec2_sd_configs: | |
- region: eu-west-2 | |
access_key: <REDACTED> | |
secret_key: <REDACTED> | |
relabel_configs: | |
- source_labels: | |
- __meta_ec2_tag_prometheus | |
- __meta_ec2_tag_app | |
regex: '.+;test|foo' | |
action: keep | |
- action: labelmap | |
regex: __meta_ec2_public_ip | |
replacement: public_ip | |
- job_name: cadvisor | |
static_configs: | |
- targets: | |
- localhost:8888 | |
metric_relabel_configs: | |
- action: labeldrop | |
regex: 'container_label_.*' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment