You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cardano Validator Watcher is a Prometheus exporter designed to help you monitor your Cardano validator nodes. It periodically collects essential metrics, providing valuable insights into the performance and health of your infrastructure. These exported metrics can be used to build monitoring dashboards (e.g with Grafana) and configure alerting rules to stay notified when something goes wrong.
Dependencies
This project use the following dependencies:
BlockFrost. You need to have a account and a subscription.
The watcher needs access to your Cardano node's socket. Two options are available:
Option A — socat sidecar (watcher has direct socket access)
Run socat alongside the watcher to expose the node socket locally:
# With Kubernetes
kubectl port-forward pod/<POD_NAME> 3002 &
socat UNIX-LISTEN:/tmp/cardano.socket,fork,reuseaddr,unlink-early TCP:127.0.0.1:3002
# Without Kubernetes
socat UNIX-LISTEN:/tmp/cardano.socket,fork,reuseaddr,unlink-early TCP:<IP>:<PORT>
Then configure socket-path in the watcher config.
Option B — Go socket proxy (no socat needed in the watcher pod)
If socat is already running on the node pod (exposing the socket over TCP), the watcher can connect directly without a local socat sidecar. Configure node-host and socat-port and the watcher will manage the proxy internally.
Ensure that you have downloaded the Genesis configuration files. You also need to provide the VRF signing key for each monitored pool.
Then, to start the watcher, execute the following command:
./cardano-validator-watcher [flags]
Flags
Flag
Description
Default Value
Required
--config
Path to the configuration file
config.yml
No
--log-level
Log Level
info
No
--http-server-host
Host on which the HTTP server should listen
127.0.0.1
No
--http-server-port
Port on which the HTTP server should listen
8080
No
--network
Cardano network ID
preprod
Yes
--database-path
Path to the local database mainly used by the Cardano client
watcher.db
No
--cardano-config-dir
Path to the directory where Cardano configuration files are stored
/config
No
--cardano-timezone
Timezone to use with cardano-cli
UTC
No
--cardano-socket-path
Path of the socket to communicate with a Cardano node (Option A)
/var/run/cardano.socket
No
--cardano-node-host
Hostname/IP of the cardano-node service (Option B)
No
--cardano-socat-port
TCP port where socat on the node pod exposes the Unix socket (Option B)
No
--blockfrost-project-id
Blockfrost project ID
Yes
--blockfrost-endpoint
Blockfrost API endpoint
Yes
--blockfrost-max-routines
Number of routines used by Blockfrost to perform concurrent actions
10
No
--blockfrost-timeout
Timeout for requests to the Blockfrost API (in seconds)
60
No
--block-watcher-enabled
Enable block watcher
True
No
--block-watcher-refresh-interval
Interval at which the block watcher collects and processes slots (in seconds)
60
No
--pool-watcher-enabled
Enable pool watcher
True
No
--pool-watcher-refresh-interval
Interval at which the pool watcher collects data on monitored pools (in seconds)
60
No
--network-watcher-enabled
Enable network watcher
True
No
--network-watcher-refresh-interval
Interval at which the network watcher collects data related to network (in seconds)
60
No
--status-watcher-refresh-interval
Interval at which the status watcher collects data related to health (in seconds)
15
No
Configuration
The watcher uses a config.yaml file in the current working directory by default. Use the --config flag to specify a different configuration file.