From 35e091d269b29c4ff08f9cc6d92c1dbd45efb1b7 Mon Sep 17 00:00:00 2001 From: Henrik Jonsson Date: Tue, 30 Apr 2019 14:40:12 +0200 Subject: [PATCH] prometheus-bitcoind.py: Add log output when server starts Otherwise, the naive user (like me) could be confused when nothing seems to happen, where in actuality the script is running the HTTP server exposing Prometheus metrics fine. --- scripts/prometheus-bitcoind.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/prometheus-bitcoind.py b/scripts/prometheus-bitcoind.py index 2457619..a553836 100644 --- a/scripts/prometheus-bitcoind.py +++ b/scripts/prometheus-bitcoind.py @@ -1,6 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +from __future__ import print_function import json import time import subprocess @@ -98,7 +99,7 @@ def get_raw_tx(txid): def main(): - # Start up the server to expose the metrics. + print('Starting HTTP server exposing Prometheus metrics on :8334..') start_http_server(8334) while True: blockchaininfo = bitcoin('getblockchaininfo')