diff --git a/.env.sample.holesky b/.env.sample.holesky index f6fdfcc7..419d110a 100644 --- a/.env.sample.holesky +++ b/.env.sample.holesky @@ -196,6 +196,12 @@ MEV_RELAYS=https://0xab78bf8c781c58078c3beb5710c57940874dd96aef2835e7742c866b4c7 # Prometheus service owner used to uniquely identify user from which metrics are pushed. #SERVICE_OWNER=charon_user +# 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. #EL_NETHERMIND_PROMTAIL_MONITORED=false diff --git a/.env.sample.hoodi b/.env.sample.hoodi index 7538ac6c..14f42ded 100644 --- a/.env.sample.hoodi +++ b/.env.sample.hoodi @@ -196,6 +196,12 @@ MEV_RELAYS=https://0x98f0ef62f00780cf8eb06701a7d22725b9437d4768bb19b363e882ae871 # Prometheus service owner used to uniquely identify user from which metrics are pushed. #SERVICE_OWNER=charon_user +# 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. #EL_NETHERMIND_PROMTAIL_MONITORED=false diff --git a/.env.sample.mainnet b/.env.sample.mainnet index 6b84c9f3..617f9ccd 100644 --- a/.env.sample.mainnet +++ b/.env.sample.mainnet @@ -196,6 +196,12 @@ MEV_RELAYS=https://0xa15b52576bcbf1072f4a011c0f99f9fb6c66f3e1ff321f11f461d15e31b # Prometheus service owner used to uniquely identify user from which metrics are pushed. #SERVICE_OWNER=charon_user +# 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. #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 \