Last active
June 12, 2023 16:17
Revisions
-
trastle revised this gist
May 28, 2017 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -34,4 +34,5 @@ scrape_configs: metric_relabel_configs: - source_labels: [ instance ] target_label: instance action: replace replacement: log-downloader -
trastle revised this gist
May 28, 2017 . No changes.There are no files selected for viewing
-
trastle revised this gist
May 28, 2017 . No changes.There are no files selected for viewing
-
trastle revised this gist
May 28, 2017 . No changes.There are no files selected for viewing
-
trastle revised this gist
May 28, 2017 . 1 changed file with 11 additions and 8 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ rule_files: scrape_configs: - job_name: 'scrape-then-use-relabel-to-rename-selected-metrics' static_configs: - targets: ['10.10.10.1:19126'] metric_relabel_configs: @@ -19,16 +19,19 @@ scrape_configs: action: replace replacement: telegraf_${1} - job_name: 'scrape-then-use-relabel-to-remove-a-label' static_configs: - targets: ['10.10.10.2:19126'] metric_relabel_configs: - source_labels: [ host ] target_label: host action: replace replacement: '' - job_name: 'scrape-then-use-relabel-add-an-arbitrary-label' static_configs: - targets: ['10.10.10.3:19126'] metric_relabel_configs: - source_labels: [ instance ] target_label: instance replacement: log-downloader -
trastle created this gist
May 28, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,34 @@ global: scrape_interval: 60s external_labels: monitor: 'example' rule_files: - /etc/prometheus/config/*.rules scrape_configs: - job_name: 'telegraf-app-1' static_configs: - targets: ['10.10.10.1:19126'] metric_relabel_configs: - source_labels: [ __name__ ] target_label: __name__ regex: '(^(?:go|http|process)_.*$)' action: replace replacement: telegraf_${1} - job_name: 'telegraf-app-2' static_configs: - targets: ['10.10.10.2:19126'] metric_relabel_configs: - source_labels: [ __name__ ] target_label: __name__ regex: '(^(?:go|http|process)_.*$)' action: replace replacement: telegraf_${1} - source_labels: [ host ] target_label: host action: replace replacement: ''