mirror of
https://github.com/RWejlgaard/pez-infra.git
synced 2026-05-06 04:14:43 +00:00
* fix: adding octopus_exporter compose * add the secret for octopus
91 lines
2.7 KiB
Django/Jinja
91 lines
2.7 KiB
Django/Jinja
---
|
|
# Ansible managed — generated from prometheus.yml.j2
|
|
# Config file location on london-a: /usr/local/etc/prometheus.yml
|
|
# Prometheus runs as: /usr/local/bin/prometheus --config.file=/usr/local/etc/prometheus.yml
|
|
# Data directory: /var/db/prometheus
|
|
|
|
global:
|
|
scrape_interval: 15s
|
|
evaluation_interval: 15s
|
|
|
|
# Alerting notifications are handled by Grafana (unified alerting with
|
|
# PagerDuty + email contact points), not Alertmanager. No alerting:
|
|
# section is needed here. Prometheus still evaluates these rule_files
|
|
# so the ALERTS / ALERTS_FOR_STATE metrics are available for queries.
|
|
rule_files:
|
|
- /usr/local/etc/prometheus/rules/*.rules
|
|
|
|
scrape_configs:
|
|
- job_name: "prometheus"
|
|
static_configs:
|
|
- targets: ["localhost:9090"]
|
|
|
|
- job_name: "octopus_exporter"
|
|
static_configs:
|
|
{% for host in groups['all'] | sort %}
|
|
{% set h = hostvars[host] %}
|
|
{% if 'octopus-exporter' in (h.docker_services | default([])) %}
|
|
- targets: ["{{ h.ansible_host }}:9359"]
|
|
labels:
|
|
location: {{ h.prometheus_location }}
|
|
server: {{ host }}
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
- job_name: "node_exporter"
|
|
static_configs:
|
|
{% for host in groups['all'] | sort %}
|
|
{% set h = hostvars[host] %}
|
|
{% if h.ansible_host is defined %}
|
|
- targets: ["{{ h.ansible_host }}:9100"]
|
|
labels:
|
|
location: {{ h.prometheus_location }}
|
|
server: {{ host }}
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
- job_name: "smartmontools"
|
|
static_configs:
|
|
{% for host in groups['all'] | sort %}
|
|
{% set h = hostvars[host] %}
|
|
{% if 'smartctl-exporter' in (h.docker_services | default([])) %}
|
|
- targets: ["{{ h.ansible_host }}:9633"]
|
|
labels:
|
|
location: {{ h.prometheus_location }}
|
|
server: {{ host }}
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
- job_name: "plex"
|
|
static_configs:
|
|
{% for host in groups['all'] | sort %}
|
|
{% set h = hostvars[host] %}
|
|
{% if 'plex-exporter' in (h.docker_services | default([])) %}
|
|
- targets: ["{{ h.ansible_host }}:9000"]
|
|
labels:
|
|
location: {{ h.prometheus_location }}
|
|
server: {{ host }}
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
- job_name: "systemd_exporter"
|
|
static_configs:
|
|
{% for host in groups['systemd_exporter_hosts'] | sort %}
|
|
{% set h = hostvars[host] %}
|
|
- targets: ["{{ h.ansible_host }}:9558"]
|
|
labels:
|
|
location: {{ h.prometheus_location }}
|
|
server: {{ host }}
|
|
{% endfor %}
|
|
|
|
- job_name: "caddy"
|
|
static_configs:
|
|
{% for host in groups['all'] | sort %}
|
|
{% set h = hostvars[host] %}
|
|
{% if h.caddy_config_src is defined %}
|
|
- targets: ["{{ h.ansible_host }}:2019"]
|
|
labels:
|
|
location: {{ h.prometheus_location }}
|
|
server: {{ host }}
|
|
{% endif %}
|
|
{% endfor %}
|