From 1026486b6667a1101328bd502ef244fe798650d8 Mon Sep 17 00:00:00 2001 From: Vincent Simonin Date: Thu, 4 Dec 2025 17:56:10 +0100 Subject: [PATCH] :heavy_plus_sign: Add Prometheus SD plugin --- Dockerfile | 2 +- configuration/plugins.py | 1 + docker-compose.yml | 20 +++++++------------- env/netbox.env | 4 ++-- plugin_requirements.txt | 1 + 5 files changed, 12 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index 52ce6d3..d4f5b2e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,6 @@ COPY configuration/plugins.py /etc/netbox/config/plugins.py COPY configuration/supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY entrypoint.sh /opt/netbox/entrypoint.sh -LABEL internal_version="4.4.5.2" +LABEL internal_version="4.4.5.3" CMD ["/opt/netbox/entrypoint.sh"] diff --git a/configuration/plugins.py b/configuration/plugins.py index a7c668c..c7ca5e0 100644 --- a/configuration/plugins.py +++ b/configuration/plugins.py @@ -2,4 +2,5 @@ "netbox_cloudflare_plugin", "netbox_docker_plugin", "netbox_passhup_plugin", + "netbox_prometheus_sd", ] diff --git a/docker-compose.yml b/docker-compose.yml index b9e5835..ead0b34 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,15 +2,13 @@ services: netbox: image: ${IMAGE}:${TAG} ports: - - 8080:8080 + - 8080:8080 depends_on: postgres: condition: service_healthy - valkey: + redis: condition: service_started - valkey-cache: - condition: service_started - user: 'unit:root' + user: "unit:root" healthcheck: interval: 60s start_period: 60s @@ -23,7 +21,7 @@ services: - netbox-reports-files:/opt/netbox/netbox/reports - netbox-scripts-files:/opt/netbox/netbox/scripts postgres: - image: docker.io/postgres:15-alpine + image: postgres:18 env_file: env/postgres.env healthcheck: interval: 60s @@ -32,15 +30,11 @@ services: retries: 5 test: "pg_isready -U $$POSTGRES_USER" volumes: - - netbox-postgres-data:/var/lib/postgresql/data - valkey: - image: valkey/valkey:7-alpine + - netbox-postgres-data:/var/lib/postgresql + redis: + image: redis:8 volumes: - netbox-valkey-data:/data - valkey-cache: - image: valkey/valkey:7-alpine - volumes: - - netbox-valkey-cache-data:/data volumes: netbox-media-files: driver: local diff --git a/env/netbox.env b/env/netbox.env index 4cd21e2..7c2462c 100644 --- a/env/netbox.env +++ b/env/netbox.env @@ -19,11 +19,11 @@ HOUSEKEEPING_INTERVAL=86400 MEDIA_ROOT=/opt/netbox/netbox/media METRICS_ENABLED=false REDIS_CACHE_DATABASE=1 -REDIS_CACHE_HOST=valkey-cache +REDIS_CACHE_HOST=redis REDIS_CACHE_INSECURE_SKIP_TLS_VERIFY=false REDIS_CACHE_SSL=false REDIS_DATABASE=0 -REDIS_HOST=valkey +REDIS_HOST=redis REDIS_INSECURE_SKIP_TLS_VERIFY=false REDIS_SSL=false RELEASE_CHECK_URL=https://api.github.com/repos/netbox-community/netbox/releases diff --git a/plugin_requirements.txt b/plugin_requirements.txt index 1d984c7..c528a8d 100644 --- a/plugin_requirements.txt +++ b/plugin_requirements.txt @@ -1,4 +1,5 @@ netbox-cloudflare-plugin == 0.* netbox-docker-plugin == 4.10.* netbox-passhup-plugin == 0.* +netbox-plugin-prometheus-sd == 1.2.0 supervisor == 4.*