Move graph-node upstream head metric exporter to monitoring stack
All checks were successful
Lint Checks / Run linter (pull_request) Successful in 45s
Webapp Test / Run webapp test suite (pull_request) Successful in 4m41s
Smoke Test / Run basic test suite (pull_request) Successful in 4m49s
Deploy Test / Run deploy test suite (pull_request) Successful in 5m42s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 8m48s

This commit is contained in:
Nabarun 2024-05-30 14:37:51 +05:30
parent 42db22bedf
commit babce424b2
6 changed files with 22 additions and 21 deletions

View File

@ -70,17 +70,6 @@ services:
start_period: 3s start_period: 3s
ports: ports:
- "5432" - "5432"
graph-node-chain-head-exporter:
image: cerc/watcher-ts:local
restart: always
working_dir: /app/packages/cli
environment:
ETH_RPC_ENDPOINT: ${ETH_RPC_ENDPOINT:-http://lotus-node-1:1234/rpc/v1}
command: ["sh", "-c", "yarn export-metrics:chain-heads"]
ports:
- '5000'
extra_hosts:
- "host.docker.internal:host-gateway"
volumes: volumes:
ipfs-import: ipfs-import:

View File

@ -53,6 +53,18 @@ services:
extra_hosts: extra_hosts:
- "host.docker.internal:host-gateway" - "host.docker.internal:host-gateway"
graph-node-upstream-head-exporter:
image: cerc/watcher-ts:local
restart: always
working_dir: /app/packages/cli
environment:
ETH_RPC_ENDPOINT: ${GRAPH_NODE_RPC_ENDPOINT}
command: ["sh", "-c", "yarn export-metrics:chain-heads"]
ports:
- '5000'
extra_hosts:
- "host.docker.internal:host-gateway"
postgres-exporter: postgres-exporter:
image: quay.io/prometheuscommunity/postgres-exporter image: quay.io/prometheuscommunity/postgres-exporter
restart: always restart: always

View File

@ -17,4 +17,4 @@ datasources:
# url: graph-node-db:5432 # url: graph-node-db:5432
# # Set password for graph-node database # # Set password for graph-node database
# secureJsonData: # secureJsonData:
# password: 'passsword' # password: 'password'

View File

@ -53,11 +53,10 @@ scrape_configs:
labels: labels:
instance: 'external' instance: 'external'
chain: 'filecoin' chain: 'filecoin'
# # Add graph-node chain-head-exported targets to be monitored below - targets: ['graph-node-upstream-head-exporter:5000']
# - targets: ['graph-node-chain-head-exporter:5000'] labels:
# labels: instance: 'graph-node'
# instance: 'graph-node' chain: 'filecoin'
# chain: 'filecoin'
- job_name: 'postgres' - job_name: 'postgres'
scrape_interval: 30s scrape_interval: 30s

View File

@ -75,9 +75,6 @@ Update `config.env` file inside deployment directory with the following values b
export ETH_RPC_HOST= export ETH_RPC_HOST=
export ETH_RPC_PORT= export ETH_RPC_PORT=
# RPC endpoint used by graph-node for exposing upstream head as metrics
export ETH_RPC_ENDPOINT=
# The etherum network(s) graph-node will connect to # The etherum network(s) graph-node will connect to
# Set this to a space-separated list of the networks where each entry has the form NAME:URL # Set this to a space-separated list of the networks where each entry has the form NAME:URL
export ETH_NETWORKS= export ETH_NETWORKS=
@ -104,7 +101,6 @@ Example `config.env` file:
```bash ```bash
export ETH_RPC_HOST=filecoin.chainup.net export ETH_RPC_HOST=filecoin.chainup.net
export ETH_RPC_PORT=443 export ETH_RPC_PORT=443
export ETH_RPC_ENDPOINT=https://filecoin.chainup.net
export ETH_NETWORKS=filecoin:https://filecoin.chainup.net/rpc/v1 export ETH_NETWORKS=filecoin:https://filecoin.chainup.net/rpc/v1

View File

@ -179,6 +179,11 @@ Set the following env variables in the deployment env config file (`monitoring-d
# Grafana server host URL (used in various links in alerts, etc.) # Grafana server host URL (used in various links in alerts, etc.)
# (Optional, default: http://localhost:3000) # (Optional, default: http://localhost:3000)
GF_SERVER_ROOT_URL= GF_SERVER_ROOT_URL=
# RPC endpoint used by graph-node for upstream head metric
# (Optional, default: https://mainnet.infura.io/v3)
GRAPH_NODE_RPC_ENDPOINT=
``` ```
## Start the stack ## Start the stack