mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
Plugin bitcoind_: improved error output
This commit is contained in:
parent
675f1f6962
commit
0a090e5be5
1 changed files with 5 additions and 4 deletions
|
@ -115,7 +115,8 @@ def main():
|
|||
return
|
||||
else:
|
||||
# TODO: Better way to report errors to Munin-node.
|
||||
raise ValueError("Could not connect to Bitcoin server.")
|
||||
print("Could not connect to Bitcoin server.", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
if request_var in ('transactions', 'block_age'):
|
||||
(info, error) = bitcoin.getblockhash(info['blocks'])
|
||||
|
@ -180,9 +181,9 @@ class Options(dict):
|
|||
if self.get(name) is None:
|
||||
missing.append(name)
|
||||
if len(missing) > 0:
|
||||
raise ValueError("Missing required setting%s: %s." %
|
||||
('s' if len(missing) > 1 else '',
|
||||
', '.join(missing)))
|
||||
print("Missing required setting%s: %s."
|
||||
% ('s' if len(missing) > 1 else '', ', '.join(missing)), file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
class ServiceProxy(object):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue