[c] change : added more services
This commit is contained in:
parent
2c5b1113d6
commit
2aed9f0f25
2 changed files with 36 additions and 20 deletions
|
@ -34,12 +34,37 @@ services:
|
||||||
container_name: prometheus
|
container_name: prometheus
|
||||||
ports:
|
ports:
|
||||||
- 9090:9090
|
- 9090:9090
|
||||||
command: "--config.file=/prometheus/prometheus.yaml"
|
command: "--config.file=/etc/prometheus/prometheus.yaml"
|
||||||
volumes:
|
volumes:
|
||||||
- ./config/prometheus.yaml:/prometheus/prometheus.yaml:ro
|
- ./prometheus:/etc/prometheus
|
||||||
- prometheus-data:/prometheus
|
- prometheus-data:/prometheus
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
|
node_exporter:
|
||||||
|
image: quay.io/prometheus/node-exporter:v1.8.0
|
||||||
|
container_name: node_exporter
|
||||||
|
command: "--path.rootfs=/host"
|
||||||
|
pid: host
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- /:/host:ro,rslave
|
||||||
|
|
||||||
|
cadvisor:
|
||||||
|
image: gcr.io/cadvisor/cadvisor:v0.49.1
|
||||||
|
container_name: cadvisor
|
||||||
|
ports:
|
||||||
|
- 8080:8080
|
||||||
|
volumes:
|
||||||
|
- /:/rootfs:ro
|
||||||
|
- /var/run:/var/run:ro
|
||||||
|
- /sys:/sys:ro
|
||||||
|
- /var/lib/docker/:/var/lib/docker:ro
|
||||||
|
- /dev/disk/:/dev/disk:ro
|
||||||
|
devices:
|
||||||
|
- /dev/kmsg
|
||||||
|
privileged: true
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
caddy-data:
|
caddy-data:
|
||||||
grafana-data:
|
grafana-data:
|
||||||
|
|
|
@ -1,27 +1,18 @@
|
||||||
global:
|
global:
|
||||||
scrape_interval: 15s # By default, scrape targets every 15 seconds.
|
scrape_interval: 15s
|
||||||
|
|
||||||
# Attach these labels to any time series or alerts when communicating with
|
|
||||||
# external systems (federation, remote storage, Alertmanager).
|
|
||||||
# external_labels:
|
|
||||||
# monitor: 'codelab-monitor'
|
|
||||||
|
|
||||||
# A scrape configuration containing exactly one endpoint to scrape:
|
|
||||||
# Here it's Prometheus itself.
|
|
||||||
scrape_configs:
|
scrape_configs:
|
||||||
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
|
|
||||||
- job_name: 'prometheus'
|
- job_name: 'prometheus'
|
||||||
# Override the global default and scrape targets from this job every 5 seconds.
|
|
||||||
scrape_interval: 5s
|
scrape_interval: 5s
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: ['localhost:9090']
|
- targets: ['localhost:9090']
|
||||||
|
|
||||||
# Example job for node_exporter
|
|
||||||
# - job_name: 'node_exporter'
|
|
||||||
# static_configs:
|
|
||||||
# - targets: ['node_exporter:9100']
|
|
||||||
|
|
||||||
# Example job for cadvisor
|
- job_name: 'node_exporter'
|
||||||
# - job_name: 'cadvisor'
|
static_configs:
|
||||||
# static_configs:
|
- targets: ['node_exporter:9100']
|
||||||
# - targets: ['cadvisor:8080']
|
|
||||||
|
|
||||||
|
- job_name: 'cadvisor'
|
||||||
|
static_configs:
|
||||||
|
- targets: ['cadvisor:8080']
|
||||||
|
|
Loading…
Reference in a new issue