Enable monitoring
Set the following in your.env file and restart:
Grafana dashboards
With monitoring enabled, Grafana is available at http://localhost:3000 (configurable viaPORT__GRAFANA).
- Username:
admin - Password:
optimism
Where metrics come from
- op-node exposes Prometheus metrics on port
7300(--metrics.enabled). Prometheus (port9090, configurable viaPORT__PROMETHEUS) scrapes op-node, the healthcheck, and the challenger. - op-geth pushes its metrics to InfluxDB (port
8086, databaseopgeth). - Grafana reads from both Prometheus and InfluxDB.
Key metrics to watch
From op-node (Prometheus,http://localhost:7300/metrics):
op_node_default_refs_number— the op-node’s current L1/L2 reference block numbers. If it stops increasing, your node is not syncing; if it goes backwards, your node is reorging.op_node_default_peer_count— how many peers op-node is connected to. Without peers, op-node cannot sync unsafe blocks and your node will lag behind the sequencer.op_node_default_rpc_client_request_duration_seconds— latency of the RPC calls op-node makes to L1 and to the execution client; useful for finding sync bottlenecks.
healthcheck_reference_height - healthcheck_target_height— how far your node lags the reference RPC (HEALTHCHECK__REFERENCE_RPC_PROVIDER, defaulthttps://forno.celo.org).healthcheck_is_currently_diverged— non-zero if your node has diverged from the reference chain.
What healthy sync looks like
Even without the Grafana stack, you can confirm your node is syncing:Syncing beacon headers downloaded=... (increasing) and later "Syncing: chain download in progress","synced":"21.07%" (percentage increasing). Until fully synced, the RPC API returns 0 for the head block number.
If your node is not syncing or has no peers, see Troubleshooting.