From 98ed05e21dc1fd4f886fd808852da58848761fd6 Mon Sep 17 00:00:00 2001 From: Evan-Kim2028 Date: Tue, 15 Oct 2024 18:00:57 -0400 Subject: [PATCH] feat: add prometheus and grafana tooling --- docker-compose.yml | 28 +++++++++++++++++++++++++++- prometheus.yml | 7 +++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 prometheus.yml diff --git a/docker-compose.yml b/docker-compose.yml index f434152..b49e799 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,8 +9,34 @@ services: networks: - app-network ports: - - "13524:13524" # expose this port to use gRPC mev-commit connection + - "13524:13524" + - "13523:13523" + + prometheus: + image: prom/prometheus:latest + volumes: + - ./prometheus.yml:/etc/prometheus/prometheus.yml + - prometheus-data:/prometheus + command: + - '--config.file=/etc/prometheus/prometheus.yml' + networks: + - app-network + ports: + - "9090:9090" + + grafana: + image: grafana/grafana:latest + networks: + - app-network + ports: + - "3000:3000" + volumes: + - grafana-data:/var/lib/grafana networks: app-network: external: true + +volumes: + grafana-data: + prometheus-data: \ No newline at end of file diff --git a/prometheus.yml b/prometheus.yml new file mode 100644 index 0000000..eea65a2 --- /dev/null +++ b/prometheus.yml @@ -0,0 +1,7 @@ +global: + scrape_interval: 15s +scrape_configs: + - job_name: 'bidder-node' + metrics_path: /metrics + static_configs: + - targets: ['mev-commit-bidder:13523']