infrastructure/ansible/plays/services/metric-export/prometheus.yml

34 lines
925 B
YAML
Raw Normal View History

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 }}"