mirror of
https://github.com/RWejlgaard/pez-infra.git
synced 2026-05-06 04:14:43 +00:00
fix: adding octopus_exporter compose
This commit is contained in:
parent
56bec98afc
commit
5cc2a4ef0f
3 changed files with 23 additions and 1 deletions
|
|
@ -3,3 +3,6 @@ host_role: idle
|
||||||
host_description: "Idle/available"
|
host_description: "Idle/available"
|
||||||
host_location: "London"
|
host_location: "London"
|
||||||
prometheus_location: london
|
prometheus_location: london
|
||||||
|
|
||||||
|
docker_services:
|
||||||
|
- octopus-exporter
|
||||||
|
|
|
||||||
11
ansible/services/octopus-exporter/docker-compose.yml
Normal file
11
ansible/services/octopus-exporter/docker-compose.yml
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
---
|
||||||
|
# octopus-exporter - Octopus Energy metrics for Prometheus
|
||||||
|
# Host: london-c (100.123.72.87)
|
||||||
|
|
||||||
|
services:
|
||||||
|
octopus-exporter:
|
||||||
|
image: rwejlgaard/octopus_exporter:v1.1.0
|
||||||
|
container_name: octopus_exporter
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "9359:9359"
|
||||||
|
|
@ -22,7 +22,15 @@ scrape_configs:
|
||||||
|
|
||||||
- job_name: "octopus_exporter"
|
- job_name: "octopus_exporter"
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: ["100.123.72.87:9359"]
|
{% 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"
|
- job_name: "node_exporter"
|
||||||
static_configs:
|
static_configs:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue