From 3fb4e7c4a36a8ea58a7b45098729fd43ae03a13b Mon Sep 17 00:00:00 2001
From: jwansek <eddie.atten.ea29@gmail.com>
Date: Mon, 26 May 2025 17:17:24 +0100
Subject: Added prometheus

---
 docker-compose.yml        | 13 +++++++++++++
 prometheus/prometheus.yml |  7 +++++++
 prometheus/web.yml        |  3 +++
 3 files changed, 23 insertions(+)
 create mode 100644 prometheus/prometheus.yml
 create mode 100644 prometheus/web.yml

diff --git a/docker-compose.yml b/docker-compose.yml
index 1775b7e..0211b8f 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -35,6 +35,7 @@ services:
             - ./config.env
         depends_on:
             - influxdb
+            - prometheus
         restart: unless-stopped
 
     snmp_client:
@@ -58,10 +59,22 @@ services:
             - 3000:3000
         depends_on:
             - influxdb
+            - prometheus
         restart: unless-stopped
         volumes:
             - grafana:/var/lib/grafana
 
+    prometheus:
+        image: prom/prometheus
+        volumes:
+            - ./prometheus/:/etc/prometheus/
+        command:
+            - --config.file=/etc/prometheus/prometheus.yml
+            - --web.config.file=/etc/prometheus/web.yml
+        ports:
+            - 9090:9090
+
+
 volumes:
     mosquitto-data:
     mosquitto-logs:
diff --git a/prometheus/prometheus.yml b/prometheus/prometheus.yml
new file mode 100644
index 0000000..c9ded40
--- /dev/null
+++ b/prometheus/prometheus.yml
@@ -0,0 +1,7 @@
+global:
+  scrape_interval: 10s
+scrape_configs:
+ - job_name: prometheus
+   static_configs:
+    - targets:
+       - prometheus:9090
diff --git a/prometheus/web.yml b/prometheus/web.yml
new file mode 100644
index 0000000..e905247
--- /dev/null
+++ b/prometheus/web.yml
@@ -0,0 +1,3 @@
+basic_auth_users:
+    admin: $2b$12$vHIcCWyDBVOOxCxPAvuoUuqmCd8nEYsmUHOLLwSEi9jKAo85OmwhK
+    eden: $2b$12$vHIcCWyDBVOOxCxPAvuoUuqmCd8nEYsmUHOLLwSEi9jKAo85OmwhK
-- 
cgit v1.2.3