Created
June 3, 2020 15:39
-
-
Save cyriltovena/7cc5359a692206782db889f4c73f78b1 to your computer and use it in GitHub Desktop.
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: monitoring | |
ec2_sd_configs: | |
- region: us-east-1 | |
port: 9100 | |
relabel_configs: | |
- action: replace | |
regex: ".*" | |
replacement: /var/log/nginx/access.log | |
target_label: __path__ | |
- source_labels: [__meta_ec2_tag_purpose] | |
regex: "(api|ws|monitoring)" | |
action: keep | |
- source_labels: [__meta_ec2_tag_purpose] | |
regex: "(api|ws|monitoring)" | |
target_label: purpose | |
- source_labels: [__meta_ec2_private_dns_name] | |
regex: "(.*)" | |
target_label: __host__ | |
- job_name: http | |
ec2_sd_configs: | |
- region: us-east-1 | |
port: 9100 | |
relabel_configs: | |
- action: replace | |
regex: ".*" | |
replacement: /var/log/nginx/error.log | |
target_label: __path__ | |
- source_labels: [__meta_ec2_tag_purpose] | |
regex: "(api|ws|monitoring)" | |
action: keep | |
- source_labels: [__meta_ec2_tag_purpose] | |
regex: "(api|ws|monitoring)" | |
target_label: purpose | |
- source_labels: [__meta_ec2_private_dns_name] | |
regex: "(.*)" | |
target_label: __host__ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment