Displaying Total Tx and Pending Tx in gLiveView

Many Cardano node operators experience a common issue where the Total Tx and Pending Tx metrics in the gLiveView dashboard show zero values. This can be easily handled, especially when your node is functioning properly. It can be successfully resolved by modifying a single parameter in the node’s configuration file.

Identifying the Problem

The issue manifests as zero values in key metrics:

  • Total Tx: The total number of transactions processed by the node.
  • Pending Tx: Transactions that are yet to be included in a block.

These metrics are crucial for monitoring the health and activity of your Cardano node.

The Solution: parameter TraceMempool

The solution is surprisingly simple: setting "TraceMempool": true in the file config.json of your Cardano node. This change enables detailed tracing of the mempool, where transactions are held before being included in a block.

Steps to Implement the Fix

  1. Locate the file config.json: This is usually in your Cardano node’s configuration directory.
  2. Edit the File: Change "TraceMempool": false to "TraceMempool": true. Add it if it is not there.
  3. Restart the Node: Apply the changes by restarting your Cardano node.

Results: Improved Metrics and Prometheus Integration

After implementing this change, you should see:

  • Non-zero values in Total Tx, Pending Tx metrics in gLiveView.
  • Activation of the Prometheus metric cardano_node_metrics_txsProcessedNum_int, allowing you to track the number of processed transactions.

Creating a Dashboard in Grafana

With Prometheus metrics now available, you can create a comprehensive dashboard in Grafana for real-time monitoring of your node’s performance.

Conclusion

A simple change in the config.json file can significantly improve the visibility of your Cardano node’s performance metrics. This fix resolves the issue of displaying zero values in the LiveView dashboard and enables integration with Prometheus and Grafana for advanced monitoring capabilities.


If you found this article insightful, follow us on X for updates and join our Discord community for discussions. Please support our work by delegating your ADA to our stake pool or buying our meme token BKV on bkvcoin.org.

BKV stake pool logo

The BKV Pool Team
Building a Stronger Cardano Network Together