Prometheus
This commit is contained in:
@@ -102,22 +102,30 @@ sudo systemctl status prometheus
|
||||
|
||||
## Docker
|
||||
|
||||
```shell
|
||||
docker run --detach --name prometheus \
|
||||
--network proxy_net \
|
||||
-p "9090:9090" \
|
||||
-v prometheus:/prometheus \
|
||||
-v ./prometheus:/etc/prometheus/targets \
|
||||
-l "caddy=prometheus.localhost" \
|
||||
-l "caddy.reverse_proxy={{upstreams 9090}}" \
|
||||
-l "caddy.tls=internal" \
|
||||
prom/prometheus:v3.8.0
|
||||
```
|
||||
|
||||
prometheus:
|
||||
container_name: r5a10-prometheus
|
||||
image: prom/prometheus:${PROMETHEUS_VERSION:-v2.53.0}
|
||||
restart: no
|
||||
|
||||
command:
|
||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||
configs:
|
||||
- source: prometheus_config
|
||||
target: /etc/prometheus/prometheus.yml
|
||||
volumes:
|
||||
- prometheus:/prometheus
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
ports:
|
||||
- 9090:9090
|
||||
extra_hosts:
|
||||
- host.docker.internal=host-gateway
|
||||
|
||||
#/etc/docker/daemon.json
|
||||
#{
|
||||
# "metrics-addr": "0.0.0.0:9323"
|
||||
|
||||
Reference in New Issue
Block a user