-
Notifications
You must be signed in to change notification settings - Fork 878
feat(docker): add Prometheus + Grafana monitoring compose overlay #3436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
cbe0b7b
a83c564
a314fb0
d91decf
1f70ad0
c924ea1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -318,6 +318,25 @@ docker-cluster-stop: | |
| @cd docker && DOCKER_PLATFORM=$(DOCKER_PLATFORM) USERID=$(shell id -u) GROUPID=$(shell id -g) GOCACHE=$(shell go env GOCACHE) docker compose down | ||
| .PHONY: localnet-stop | ||
|
|
||
| # Start 4-node cluster with Prometheus and Grafana monitoring | ||
| docker-cluster-start-monitoring: docker-cluster-stop-monitoring build-docker-node | ||
| @rm -rf $(PROJECT_HOME)/build/generated | ||
| @mkdir -p $(shell go env GOPATH)/pkg/mod | ||
| @mkdir -p $(shell go env GOCACHE) | ||
| @cd docker && \ | ||
| if [ "$${DOCKER_DETACH:-}" = "true" ]; then \ | ||
| DETACH_FLAG="-d"; \ | ||
| else \ | ||
| DETACH_FLAG=""; \ | ||
| fi; \ | ||
| DOCKER_PLATFORM=$(DOCKER_PLATFORM) USERID=$(shell id -u) GROUPID=$(shell id -g) GOCACHE=$(shell go env GOCACHE) NUM_ACCOUNTS=10 INVARIANT_CHECK_INTERVAL=${INVARIANT_CHECK_INTERVAL} UPGRADE_VERSION_LIST=${UPGRADE_VERSION_LIST} MOCK_BALANCES=${MOCK_BALANCES} GIGA_EXECUTOR=${GIGA_EXECUTOR} GIGA_OCC=${GIGA_OCC} RECEIPT_BACKEND=${RECEIPT_BACKEND} AUTOBAHN=${AUTOBAHN} GIGA_STORAGE=${GIGA_STORAGE} docker compose -f docker-compose.yml -f docker-compose.monitoring.yml up --no-attach grafana --no-attach prometheus $$DETACH_FLAG | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Monitoring target duplicates entire cluster-start recipe bodyLow Severity The Additional Locations (1)Reviewed by Cursor Bugbot for commit 1f70ad0. Configure here. |
||
| .PHONY: docker-cluster-start-monitoring | ||
|
|
||
| # Stop monitoring containers (Prometheus and Grafana) and cluster | ||
| docker-cluster-stop-monitoring: | ||
| @cd docker && DOCKER_PLATFORM=$(DOCKER_PLATFORM) USERID=$(shell id -u) GROUPID=$(shell id -g) GOCACHE=$(shell go env GOCACHE) docker compose -f docker-compose.yml -f docker-compose.monitoring.yml down | ||
| .PHONY: docker-cluster-stop-monitoring | ||
|
|
||
| # Run GIGA EVM integration tests with a GIGA-enabled cluster | ||
| # This starts a fresh cluster with GIGA_EXECUTOR and GIGA_OCC enabled, | ||
| # runs the EVM GIGA tests, then stops the cluster. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| services: | ||
| prometheus: | ||
| container_name: sei-prometheus | ||
| image: prom/prometheus:latest | ||
| ports: | ||
| - "9099:9090" | ||
| volumes: | ||
| - ./docker_compose_monitoring/prometheus.yaml:/etc/prometheus/prometheus.yml:ro | ||
| command: | ||
| - --config.file=/etc/prometheus/prometheus.yml | ||
| - --storage.tsdb.path=/prometheus | ||
| - --web.enable-lifecycle | ||
| networks: | ||
| - localnet | ||
|
|
||
| grafana: | ||
| container_name: sei-grafana | ||
| image: grafana/grafana:latest | ||
| ports: | ||
| - "3000:3000" | ||
| volumes: | ||
| - ./docker_compose_monitoring/grafana-datasource.yaml:/etc/grafana/provisioning/datasources/grafana-datasource.yaml:ro | ||
| environment: | ||
| - GF_SECURITY_ADMIN_USER=admin | ||
| - GF_SECURITY_ADMIN_PASSWORD=admin | ||
| - GF_USERS_ALLOW_SIGN_UP=false | ||
| depends_on: | ||
| - prometheus | ||
| networks: | ||
| - localnet | ||
|
|
||
| networks: | ||
| localnet: |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| apiVersion: 1 | ||
| datasources: | ||
| - name: Prometheus | ||
| type: prometheus | ||
| access: proxy | ||
| url: http://prometheus:9090 | ||
| isDefault: true | ||
| editable: false |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| global: | ||
| scrape_interval: 15s | ||
| evaluation_interval: 15s | ||
|
|
||
| scrape_configs: | ||
| - job_name: 'sei-localnet' | ||
| metrics_path: '/metrics' | ||
| static_configs: | ||
| - targets: | ||
| - 'sei-node-0:26660' | ||
| - 'sei-node-1:26660' | ||
| - 'sei-node-2:26660' | ||
| - 'sei-node-3:26660' | ||
| scrape_interval: 5s |


Uh oh!
There was an error while loading. Please reload this page.