From e387d65196cae91e7e140dc87ff2f69c56e7197f Mon Sep 17 00:00:00 2001 From: Enderson Maia Date: Mon, 12 Aug 2024 14:12:46 -0300 Subject: [PATCH] feat(cli): expose rollups-node prometheus metrics --- .changeset/silent-bags-accept.md | 5 +++++ apps/cli/src/node/docker-compose-validator.yaml | 12 ++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 .changeset/silent-bags-accept.md diff --git a/.changeset/silent-bags-accept.md b/.changeset/silent-bags-accept.md new file mode 100644 index 00000000..80ff8303 --- /dev/null +++ b/.changeset/silent-bags-accept.md @@ -0,0 +1,5 @@ +--- +"@cartesi/cli": patch +--- + +expose rollups-node prometheus metrics diff --git a/apps/cli/src/node/docker-compose-validator.yaml b/apps/cli/src/node/docker-compose-validator.yaml index 81f7dba8..63ac50d8 100644 --- a/apps/cli/src/node/docker-compose-validator.yaml +++ b/apps/cli/src/node/docker-compose-validator.yaml @@ -32,6 +32,7 @@ services: environment: PROMPT_TXT_02_GRAPHQL: "GraphQL running at http://localhost:${CARTESI_LISTEN_PORT}/graphql" PROMPT_TXT_03_INSPECT: "Inspect running at http://localhost:${CARTESI_LISTEN_PORT}/inspect/" + PROMPT_TXT_08_METRICS: "Prometheus metrics at http://localhost:${CARTESI_LISTEN_PORT}/metrics" traefik-config-generator: environment: @@ -57,3 +58,14 @@ services: loadBalancer: servers: - url: "http://validator:10000/graphql" + TRAEFIK_CONFIG_VALIDATOR_METRICS: | + http: + routers: + validator_metrics: + rule: "PathPrefix(`/metrics`)" + service: validator_metrics + services: + validator_metrics: + loadBalancer: + servers: + - url: "http://validator:10000/metrics"