Skip to content

Commit

Permalink
Merge pull request #671 from cndolo/fix/logging-docs
Browse files Browse the repository at this point in the history
log correct number of outbound connections
  • Loading branch information
pinheadmz authored Dec 6, 2024
2 parents 9829d18 + 241f580 commit 0287fdf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/logging_monitoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion resources/images/exporter/bitcoin-exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0287fdf

Please sign in to comment.