From 241f580540396737dd4b58b0fd1674f760ab0e8d Mon Sep 17 00:00:00 2001 From: Charmaine Ndolo Date: Fri, 6 Dec 2024 09:30:30 +0100 Subject: [PATCH] log correct number of outbound connections --- docs/logging_monitoring.md | 4 ++-- resources/images/exporter/bitcoin-exporter.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/logging_monitoring.md b/docs/logging_monitoring.md index 9674979ad..f5bc705fa 100644 --- a/docs/logging_monitoring.md +++ b/docs/logging_monitoring.md @@ -96,7 +96,7 @@ For example, the default metrics listed above would be explicitly configured as nodes: - name: tank-0000 metricsExport: true - metrics: blocks=getblockcount() inbounds=getnetworkinfo()["connections_in"] outbounds=getnetworkinfo()["connections_in"] mempool_size=getmempoolinfo()["size"] + metrics: blocks=getblockcount() inbounds=getnetworkinfo()["connections_in"] outbounds=getnetworkinfo()["connections_out"] mempool_size=getmempoolinfo()["size"] ``` The data can be retrieved directly from the Prometheus exporter container in the tank pod via port `9332`, example: @@ -108,7 +108,7 @@ blocks 704.0 # HELP inbounds getnetworkinfo()["connections_in"] # TYPE inbounds gauge inbounds 0.0 -# HELP outbounds getnetworkinfo()["connections_in"] +# HELP outbounds getnetworkinfo()["connections_out"] # TYPE outbounds gauge outbounds 0.0 # HELP mempool_size getmempoolinfo()["size"] diff --git a/resources/images/exporter/bitcoin-exporter.py b/resources/images/exporter/bitcoin-exporter.py index 8b2cbec25..99c992207 100644 --- a/resources/images/exporter/bitcoin-exporter.py +++ b/resources/images/exporter/bitcoin-exporter.py @@ -28,7 +28,7 @@ def auth_proxy_request(self, method, path, postdata): # label=method(params)[return object key][...] METRICS = os.environ.get( "METRICS", - 'blocks=getblockcount() inbounds=getnetworkinfo()["connections_in"] outbounds=getnetworkinfo()["connections_in"] mempool_size=getmempoolinfo()["size"]', + 'blocks=getblockcount() inbounds=getnetworkinfo()["connections_in"] outbounds=getnetworkinfo()["connections_out"] mempool_size=getmempoolinfo()["size"]', ) # Set up bitcoind RPC client