Skip to content
This repository has been archived by the owner on Jul 13, 2022. It is now read-only.

Latest commit

 

History

History
31 lines (27 loc) · 967 Bytes

metrics.md

File metadata and controls

31 lines (27 loc) · 967 Bytes

Metrics

Basic metrics and a health status check can be enabled with the --metrics flag (default port 8001, use --metricsPort to specify).

Prometheus

Prometheus metrics are served on /metrics. For each chain that exists, this provides:

  • <chain>_blocks_processed: the number of blocks processed by the chains listener.
  • <chain>_latest_processed_block: most recent block that has been processed by the listener.
  • <chain>_latest_known_block: most recent block that exists on the chain.
  • <chain>_votes_submitted: number of votes submitted by the relayer.

Health Check

The endpoint /health will return the current known block height, and a timestamp of when it was first seen for every chain:

{
 "chains": [
   {
     "chainId": "Number",
     "height": "Number",
     "lastUpdated": "Date"
   }
 ]
} 

If the timestamp is at least 120 seconds old an error will be returned instead:

{
  "error": "String"
}