Skip to content

Commit

Permalink
External prometheus (#109)
Browse files Browse the repository at this point in the history
Co-authored-by: clostao <[email protected]>
  • Loading branch information
deblanco and clostao authored Aug 29, 2023
1 parent f3d1ecb commit bb6f2e7
Show file tree
Hide file tree
Showing 7 changed files with 643 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docker/alphanet/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if [ -n "$SEED" ]; then

fi

START_COMMAND="./target/release/stability --base-path /tmp/node --validator --unsafe-rpc-external --rpc-cors all --unsafe-ws-external --chain alphanet --pruning archive"
START_COMMAND="./target/release/stability --base-path /tmp/node --validator --unsafe-rpc-external --rpc-cors all --unsafe-ws-external --chain alphanet --pruning archive --prometheus-external"

if [ -n "$NODE_KEY" ]; then
START_COMMAND="$START_COMMAND --node-key $NODE_KEY"
Expand Down
48 changes: 48 additions & 0 deletions docker/monitoring/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
version: '3.8'

networks:
monitoring:
driver: bridge

volumes:
prometheus_data: {}
grafana_data: {}

services:
prometheus:
image: prom/prometheus:latest
container_name: prometheus
restart: unless-stopped
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--web.enable-lifecycle'
ports:
- 9090:9090
networks:
- monitoring
extra_hosts:
- "host.docker.internal:host-gateway"

grafana:
image: grafana/grafana
restart: always
environment:
GF_INSTALL_PLUGINS: 'grafana-clock-panel,grafana-simple-json-datasource'
GF_SECURITY_ADMIN_PASSWORD: 'admin'
GF_USERS_ALLOW_SIGN_UP: false
volumes:
# - ./grafana:/var/lib/grafana
- grafana_data:/var/lib/grafana
- ./grafana/provisioning/:/etc/grafana/provisioning/
ports:
- 3000:3000
depends_on:
- prometheus
networks:
- monitoring
11 changes: 11 additions & 0 deletions docker/monitoring/grafana/provisioning/dashboards/dashboard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: 1

providers:
- name: "Prometheus"
orgId: 1
folder: ""
type: file
disableDeletion: false
editable: true
options:
path: /etc/grafana/provisioning/dashboards
Loading

0 comments on commit bb6f2e7

Please sign in to comment.