Zcash-monitor: An exporter for the Prometheus monitoring system

zcash-monitor.py is a script written in Python intended to run alongside a Zcash node and export statistics for monitoring purposes. It assumes the existence of zcash-cli in the PATH and access to the RPC interface over localhost.

It’s meant for use with the Prometheus monitoring system and time-series database.

It tracks stuff like: block height, difficulty, number of peers, network solutions per second, errors, mempool size, size of recent blocks, number of transactions within blocks, chaintips, total bytes received and sent, transaction inputs and outputs, and the make-up of transactions in terms of JoinSplits, shielded, unshielded or mixed. These Zcash metrics are refreshed once every 2 minutes.

Here’s the code: https://gist.github.com/ageis/23e243dcee51cbcc75d8d4bdfbf7f076