This commit is contained in:
2024-12-06 11:29:37 +01:00
parent ffc6af27e3
commit 68b4fd8d8f
5 changed files with 28 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
PROMETHEUS_CONTAINER_NAME=prometheus
PROMETHEUS_HOSTNAME=prometheus
PROMETHEUS_IMAGE=docker.io/prom/prometheus
PROMETHEUS_TAG=latest

View File

@@ -1,17 +1,16 @@
---
version: '3'
services:
prometheus:
container_name: ${PROMETHEUS_CONTAINER_NAME:-prometheus}
hostname: prometheus
image: ${PROMETHEUS_IMAGE:-docker.io/containrrr/prometheus}:${PROMETHEUS_TAG:-latest}
image: ${PROMETHEUS_IMAGE:-docker.io/prom/prometheus}:${PROMETHEUS_TAG:-latest}
restart: unless-stopped
networks:
- prometheus-net
volumes:
- "${BASE_DIR:?err}/${PROMETHEUS_CONTAINER_NAME}/etc:/etc/prometheus:Z,rw"
# ownership: nobody:nobody
- "${BASE_DIR}/${PROMETHEUS_CONTAINER_NAME}/data:/prometheus:Z,rw"
ports:
- "127.0.0.1:9090:9090"

0
etc/file_sd/.gitkeep Normal file
View File

View File

25
etc/prometheus.yml Normal file
View File

@@ -0,0 +1,25 @@
---
global:
scrape_interval: 1m
scrape_timeout: 10s
evaluation_interval: 1m
remote_write:
remote_read:
rule_files:
alerting:
alertmanagers:
scrape_configs:
- job_name: "prometheus"
static_configs:
- targets:
- "localhost:9090"
- job_name: node
file_sd_configs:
- files:
- /etc/prometheus/file_sd/node/*.yml