Module: check_mk
Branch: master
Commit: 3fa6025b88bc608335be3e85d105328753c69de9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3fa6025b88bc60…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Mar 12 08:45:26 2015 +0100
mk_jolokia: Added more debug output
---
agents/plugins/mk_jolokia | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/agents/plugins/mk_jolokia b/agents/plugins/mk_jolokia
index 40553ad..05d2e47 100755
--- a/agents/plugins/mk_jolokia
+++ b/agents/plugins/mk_jolokia
@@ -30,10 +30,14 @@ opt_debug = '--debug' in sys.argv
def fetch_var(server, port, path, suburi, itemspec):
url = "http://%s:%d/%s/%s" % (server, port, suburi, path)
+ if opt_debug:
+ sys.stderr.write("DEBUG: Fetching: %s\n" % url)
try:
json = urllib2.urlopen(url).read()
+ if opt_debug:
+ sys.stderr.write("DEBUG: Result: %s\n\n" % json)
except Exception, e:
- sys.stderr.write("ERROR: %s" % e)
+ sys.stderr.write("ERROR: %s\n" % e)
return []