Skip to content
This repository has been archived by the owner on Nov 27, 2021. It is now read-only.

prometheus-bitcoind.py: Add log output when server starts #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion scripts/prometheus-bitcoind.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-

from __future__ import print_function
import json
import time
import subprocess
Expand Down Expand Up @@ -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')
Expand Down