Module: check_mk
Branch: master
Commit: ab8d184537e7aa555ed529a106c7030f4f93a6d1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ab8d184537e7aa…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 12 14:31:03 2016 +0100
Removed unused variable
Change-Id: Iffc1a945ca9f732e023debefb00dfd4d058f370d
---
web/htdocs/visuals.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/web/htdocs/visuals.py b/web/htdocs/visuals.py
index 176e60a..3657b50 100644
--- a/web/htdocs/visuals.py
+++ b/web/htdocs/visuals.py
@@ -938,7 +938,6 @@ class Filter:
# Is used to populate a value, for example loaded from persistance, into
# the HTML context where it can be used by e.g. the display() method.
def set_value(self, value):
- val = {}
for varname in self.htmlvars:
html.set_var(varname, value.get(varname))
Module: check_mk
Branch: master
Commit: 4bb18ed733ac36fcd6179b67dfeafbdabb3a4145
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4bb18ed733ac36…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 12 13:31:06 2016 +0100
agent_jolokia: Fixed verbose mode and improved help output
Change-Id: I347cae15a4b1b22e12cb4e1a4aa96be92a0cfeea
---
agents/special/agent_jolokia | 36 ++++++++++++++----------------------
1 file changed, 14 insertions(+), 22 deletions(-)
diff --git a/agents/special/agent_jolokia b/agents/special/agent_jolokia
index 0753eff..09864c8 100755
--- a/agents/special/agent_jolokia
+++ b/agents/special/agent_jolokia
@@ -144,13 +144,13 @@ class HTTPSAuthHandler(urllib2.HTTPSHandler):
def fetch_var(protocol, server, port, path, suburi, cert_path, itemspec):
url = "%s://%s:%d/%s/%s" % (protocol, server, port, suburi, path)
if opt_verbose:
- sys.stderr.write("DEBUG: Fetching: %s\n" % url)
+ sys.stderr.write("Fetching: %s\n" % url)
try:
conn = urllib2.urlopen(url)
data = conn.read()
if opt_verbose:
- sys.stderr.write("DEBUG: Result: %s\n\n" % data)
+ sys.stderr.write("Result: %s\n\n" % data)
except Exception, e:
if opt_debug:
raise
@@ -324,33 +324,22 @@ USAGE: mk_jolokia [OPTIONS]
OPTIONS:
--help Show this help message and exit
- --server Host name or IP address of the Jolokia server. Default: localhost
- --port TCP Port of the Jolokia server. Default: 8080
- --user Username to use for the connection. Default: monitoring
- --password Password to use for connecting. Default: none
- --mode Authentication mode. Can be "basic" or "digest". Default: digest
- --suburi Path-component of the uri to query. Default: jolokia
- --instance Name of the instance in the monitoring
+ --server=SERVER Host name or IP address of the Jolokia server. Default: localhost
+ --port=PORT TCP Port of the Jolokia server. Default: 8080
+ --user=USER Username to use for the connection. Default: monitoring
+ --password=PASSWORD Password to use for connecting. Default: none
+ --mode=MODE Authentication mode. Can be "basic" or "digest". Default: digest
+ --suburi=SUBURI Path-component of the URI to query. Default: jolokia
+ --instance=INSTANCE Name of the instance in the monitoring
--debug Debug mode: let Python exceptions come through
+ --verbose Output some more detailed information
""")
-
-"""
- for param in ['server', 'port', 'suburi', 'instance', 'protocol', 'cert_path', 'client_cert', 'client_key']:
- if param in params:
- arglist.append('--%s %s' % (param, params[param]))
-
- if 'login' in params:
- arglist.append('--user %s' % params['login'][0])
- arglist.append('--password %s' % params['login'][1])
-"""
-
-
def parse_arguments():
short_options = ''
long_options = [
- 'help', 'server=', 'port=', 'user=', 'password=', 'mode=', 'suburi=', 'instance=',
+ 'help', 'verbose', 'server=', 'port=', 'user=', 'password=', 'mode=', 'suburi=', 'instance=',
'protocol=', 'cert_path=', 'client_cert=', 'client_key='
]
@@ -368,6 +357,9 @@ def parse_arguments():
global opt_debug
opt_debug = 'debug' in opts
+ global opt_verbose
+ opt_verbose = 'verbose' in opts
+
for optional, default in [('server', "localhost"),
('user', "monitoring"),
('password', None),