infrastructure/ansible/plays/services/metric-export/prometheus.yml
Tobias Manske cacb70972e
Some checks failed
continuous-integration/drone/push Build is failing
Add custom scrape configs to some hosts
2024-01-10 02:19:53 +01:00

34 lines
925 B
YAML

global:
scrape_interval: 15s
scrape_timeout: 10s
evaluation_interval: 15s
scrape_configs:
- job_name: prometheus
honor_timestamps: true
scrape_interval: 15s
scrape_timeout: 10s
metrics_path: /metrics
scheme: http
static_configs:
- targets:
- localhost:9090
- job_name: 'service_discovery'
metric_relabel_configs:
- source_labels:
- "container_name"
target_label: "instance"
action: replace
file_sd_configs:
- files:
- /label_discovery/docker-targets.json
{% if metrics.additional_scrape_rules is defined %}
{{ metrics.additional_scrape_rules | to_nice_yaml}}
{% endif %}
remote_write:
- url: https://{{ common.mimir.host | mandatory }}/api/v1/push
headers:
X-Scope-OrgID: "{{ inventory_hostname | replace('.', '-') }}"
basic_auth:
username: "{{ common.mimir.username | mandatory }}"
password: "{{ common.mimir.password | mandatory }}"