From 10c3c9ade494ba1b7ae72b723931037c38b5bff8 Mon Sep 17 00:00:00 2001 From: Diogo Santos Date: Thu, 11 Dec 2025 12:40:22 +0000 Subject: [PATCH 1/2] add new env and label --- .env.sample.holesky | 3 +++ .env.sample.hoodi | 3 +++ .env.sample.mainnet | 3 +++ prometheus/prometheus.yml.example | 4 ++++ prometheus/run.sh | 1 + 5 files changed, 14 insertions(+) diff --git a/.env.sample.holesky b/.env.sample.holesky index f6fdfcc7..f6aeef26 100644 --- a/.env.sample.holesky +++ b/.env.sample.holesky @@ -196,6 +196,9 @@ MEV_RELAYS=https://0xab78bf8c781c58078c3beb5710c57940874dd96aef2835e7742c866b4c7 # Prometheus service owner used to uniquely identify user from which metrics are pushed. #SERVICE_OWNER=charon_user +# Discord user IDs for alert notifications (comma-separated). +#ALERT_DISCORD_IDS= + # Uncomment these if you have log exporting with Promtail # and want to disable log export on a particular container. #EL_NETHERMIND_PROMTAIL_MONITORED=false diff --git a/.env.sample.hoodi b/.env.sample.hoodi index 7538ac6c..2c019284 100644 --- a/.env.sample.hoodi +++ b/.env.sample.hoodi @@ -196,6 +196,9 @@ MEV_RELAYS=https://0x98f0ef62f00780cf8eb06701a7d22725b9437d4768bb19b363e882ae871 # Prometheus service owner used to uniquely identify user from which metrics are pushed. #SERVICE_OWNER=charon_user +# Discord user IDs for alert notifications (comma-separated). +#ALERT_DISCORD_IDS= + # Uncomment these if you have log exporting with Promtail # and want to disable log export on a particular container. #EL_NETHERMIND_PROMTAIL_MONITORED=false diff --git a/.env.sample.mainnet b/.env.sample.mainnet index 6b84c9f3..72458433 100644 --- a/.env.sample.mainnet +++ b/.env.sample.mainnet @@ -196,6 +196,9 @@ MEV_RELAYS=https://0xa15b52576bcbf1072f4a011c0f99f9fb6c66f3e1ff321f11f461d15e31b # Prometheus service owner used to uniquely identify user from which metrics are pushed. #SERVICE_OWNER=charon_user +# Discord user IDs for alert notifications (comma-separated). +#ALERT_DISCORD_IDS= + # Uncomment these if you have log exporting with Promtail # and want to disable log export on a particular container. #EL_NETHERMIND_PROMTAIL_MONITORED=false diff --git a/prometheus/prometheus.yml.example b/prometheus/prometheus.yml.example index 52146208..3cb1d886 100644 --- a/prometheus/prometheus.yml.example +++ b/prometheus/prometheus.yml.example @@ -23,6 +23,10 @@ scrape_configs: - job_name: "charon" static_configs: - targets: ["charon:3620"] + relabel_configs: + - target_label: alert_discord_ids + replacement: "$ALERT_DISCORD_IDS" + - job_name: "lodestar" static_configs: - targets: ["lodestar:5064"] diff --git a/prometheus/run.sh b/prometheus/run.sh index 69315050..000941ba 100755 --- a/prometheus/run.sh +++ b/prometheus/run.sh @@ -14,6 +14,7 @@ fi sed -e "s|\$PROM_REMOTE_WRITE_TOKEN|${PROM_REMOTE_WRITE_TOKEN}|g" \ -e "s|\$SERVICE_OWNER|${SERVICE_OWNER}|g" \ + -e "s|\$ALERT_DISCORD_IDS|${ALERT_DISCORD_IDS}|g" \ /etc/prometheus/prometheus.yml.example > /etc/prometheus/prometheus.yml /bin/prometheus \ From 82a7d05fcbc1ef7bdd7475a01c7745e6e6423ee5 Mon Sep 17 00:00:00 2001 From: Diogo Santos Date: Fri, 12 Dec 2025 09:19:40 +0000 Subject: [PATCH 2/2] update envs --- .env.sample.holesky | 7 +++++-- .env.sample.hoodi | 7 +++++-- .env.sample.mainnet | 7 +++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.env.sample.holesky b/.env.sample.holesky index f6aeef26..419d110a 100644 --- a/.env.sample.holesky +++ b/.env.sample.holesky @@ -196,8 +196,11 @@ MEV_RELAYS=https://0xab78bf8c781c58078c3beb5710c57940874dd96aef2835e7742c866b4c7 # Prometheus service owner used to uniquely identify user from which metrics are pushed. #SERVICE_OWNER=charon_user -# Discord user IDs for alert notifications (comma-separated). -#ALERT_DISCORD_IDS= +# To get Alerted with Obol Agent monitoring on Discord, specify your Discord ID(s) below. +# Enable developer mode on discord with User Settings > Advanced. +# Then right click on a user's profile picture or name and select Copy ID to get a unique 18-digit number that represents their account. +# Specify multiple discord IDs using comma separation. (e.g. `DISCORD_IDS=123456789098765432,098765432123456789`) +#ALERT_DISCORD_IDS="" # Uncomment these if you have log exporting with Promtail # and want to disable log export on a particular container. diff --git a/.env.sample.hoodi b/.env.sample.hoodi index 2c019284..14f42ded 100644 --- a/.env.sample.hoodi +++ b/.env.sample.hoodi @@ -196,8 +196,11 @@ MEV_RELAYS=https://0x98f0ef62f00780cf8eb06701a7d22725b9437d4768bb19b363e882ae871 # Prometheus service owner used to uniquely identify user from which metrics are pushed. #SERVICE_OWNER=charon_user -# Discord user IDs for alert notifications (comma-separated). -#ALERT_DISCORD_IDS= +# To get Alerted with Obol Agent monitoring on Discord, specify your Discord ID(s) below. +# Enable developer mode on discord with User Settings > Advanced. +# Then right click on a user's profile picture or name and select Copy ID to get a unique 18-digit number that represents their account. +# Specify multiple discord IDs using comma separation. (e.g. `DISCORD_IDS=123456789098765432,098765432123456789`) +#ALERT_DISCORD_IDS="" # Uncomment these if you have log exporting with Promtail # and want to disable log export on a particular container. diff --git a/.env.sample.mainnet b/.env.sample.mainnet index 72458433..617f9ccd 100644 --- a/.env.sample.mainnet +++ b/.env.sample.mainnet @@ -196,8 +196,11 @@ MEV_RELAYS=https://0xa15b52576bcbf1072f4a011c0f99f9fb6c66f3e1ff321f11f461d15e31b # Prometheus service owner used to uniquely identify user from which metrics are pushed. #SERVICE_OWNER=charon_user -# Discord user IDs for alert notifications (comma-separated). -#ALERT_DISCORD_IDS= +# To get Alerted with Obol Agent monitoring on Discord, specify your Discord ID(s) below. +# Enable developer mode on discord with User Settings > Advanced. +# Then right click on a user's profile picture or name and select Copy ID to get a unique 18-digit number that represents their account. +# Specify multiple discord IDs using comma separation. (e.g. `DISCORD_IDS=123456789098765432,098765432123456789`) +#ALERT_DISCORD_IDS="" # Uncomment these if you have log exporting with Promtail # and want to disable log export on a particular container.