Skip to content

Commit

Permalink
Setting prometheus config to use env variables (#260)
Browse files Browse the repository at this point in the history
- Enable prometheus --config-expand in docker-compose.yml to allow
operator specify a unique label that can be used to identify their nodes
and help obol route alerts to specific node operators

---------

Signed-off-by: haroldsphinx <[email protected]>
Co-authored-by: LukeHackett12 <[email protected]>
  • Loading branch information
haroldsphinx and LukeHackett12 authored May 3, 2024
1 parent f2997f5 commit aef9a6f
Show file tree
Hide file tree
Showing 5 changed files with 3,640 additions and 2,691 deletions.
12 changes: 8 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ services:
# |___/

lighthouse:
image: sigp/lighthouse:${LIGHTHOUSE_VERSION:-v5.1.0}
image: sigp/lighthouse:${LIGHTHOUSE_VERSION:-v5.1.3}
ports:
- ${LIGHTHOUSE_PORT_P2P:-9000}:9000/tcp # P2P TCP
- ${LIGHTHOUSE_PORT_P2P:-9000}:9000/udp # P2P UDP
Expand Down Expand Up @@ -101,7 +101,7 @@ services:
# |_|\___/ \__,_|\___||___/\__\__,_|_|

lodestar:
image: chainsafe/lodestar:${LODESTAR_VERSION:-v1.16.0}
image: chainsafe/lodestar:${LODESTAR_VERSION:-v1.17.0}
depends_on: [charon]
entrypoint: /opt/lodestar/run.sh
networks: [dvnode]
Expand Down Expand Up @@ -137,25 +137,29 @@ services:
# | | | | | | (_) | | | | | || (_) | | | | | | | (_| |
# |_| |_| |_|\___/|_| |_|_|\__\___/|_| |_|_| |_|\__, |
# |___/

prometheus:
image: prom/prometheus:${PROMETHEUS_VERSION:-v2.50.1}
user: ":"
networks: [dvnode]
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- ./data/prometheus:/prometheus
command:
- "--enable-feature=expand-external-labels"
- "--config.file=/etc/prometheus/prometheus.yml"
restart: unless-stopped

grafana:
image: grafana/grafana:${GRAFANA_VERSION:-10.3.3}
image: grafana/grafana:${GRAFANA_VERSION:-10.4.2}
user: ":"
ports:
- ${MONITORING_PORT_GRAFANA:-3000}:3000
networks: [dvnode]
volumes:
- ./grafana/datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml
- ./grafana/dashboards.yml:/etc/grafana/provisioning/dashboards/datasource.yml
- ./grafana/alerts:/etc/grafana/provisioning/alerting
- ./grafana/grafana.ini:/etc/grafana/grafana.ini:ro
- ./grafana/dashboards:/etc/dashboards
- ./data/grafana:/var/lib/grafana
Expand Down
Loading

0 comments on commit aef9a6f

Please sign in to comment.