Add prometheus for caddy and unbound exporters

This commit is contained in:
BBaoVanC 2021-08-16 02:38:40 -05:00
parent 28edff04f6
commit 63373124e7
4 changed files with 40 additions and 10 deletions

4
.gitmodules vendored Normal file
View File

@ -0,0 +1,4 @@
[submodule "unbound-telemetry"]
path = unbound-telemetry
url = https://github.com/svartalf/unbound-telemetry.git
branch = master

14
conf/prometheus.yml Normal file
View File

@ -0,0 +1,14 @@
scrape_configs:
- job_name: "caddy"
scrape_interval: 15s
static_configs:
- targets: ["host.docker.internal:2020"]
labels:
instance: "boba.best"
- job_name: "unbound"
scrape_interval: 15s
static_configs:
- targets: ["unbound-telemetry:9167"]
labels:
instance: "boba.best"

View File

@ -34,13 +34,24 @@ services:
- 127.0.0.1:84:3000 - 127.0.0.1:84:3000
restart: always restart: always
#prometheus: prometheus:
# image: prom/prometheus:latest image: prom/prometheus:latest
# restart: always container_name: grafana_prometheus
# command: restart: always
# - --config.file=/etc/prometheus/prometheus.yml command:
# volumes: - --config.file=/etc/prometheus/prometheus.yml
# - ./conf/prometheus.yml:/etc/prometheus/prometheus.yml volumes:
# - ./data/prometheus:/prometheus - ./conf/prometheus.yml:/etc/prometheus/prometheus.yml
# extra_hosts: - ./data/prometheus:/prometheus
# - "host.docker.internal:host-gateway" extra_hosts:
- "host.docker.internal:host-gateway"
unbound-telemetry:
build: unbound-telemetry
restart: always
command:
- uds
- --control-interface
- /data/remote-control.sock
volumes:
- ./data/unbound-telemetry:/data

1
unbound-telemetry Submodule

@ -0,0 +1 @@
Subproject commit 7f1b6d4e9e4b6a3216a78c23df745bcf8fc84021