mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
verbose mode as runtime flag
This commit is contained in:
parent
352a9baf94
commit
f110d3ddb1
1 changed files with 4 additions and 2 deletions
|
@ -188,7 +188,7 @@ class MuninHandler(SocketServer.StreamRequestHandler):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def handle(self):
|
def handle(self):
|
||||||
print "%s: Connection from %s:%s. server args is %s" \
|
if self.server.args.get("verbose"): print "%s: Connection from %s:%s. server args is %s" \
|
||||||
% (self.server.args["name"], self.client_address[0], self.client_address[1], self.server.args)
|
% (self.server.args["name"], self.client_address[0], self.client_address[1], self.server.args)
|
||||||
# slow path
|
# slow path
|
||||||
hostname = self.server.args["name"]
|
hostname = self.server.args["name"]
|
||||||
|
@ -264,7 +264,7 @@ def start_servers(instances):
|
||||||
|
|
||||||
|
|
||||||
def usage():
|
def usage():
|
||||||
print "Usage: %s [--run] [--muninconf] <configfile>" % sys.argv[0]
|
print "Usage: %s [--run] [--verbose] [--muninconf] <configfile>" % sys.argv[0]
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
if len(sys.argv) <= 2:
|
if len(sys.argv) <= 2:
|
||||||
|
@ -326,6 +326,8 @@ def main():
|
||||||
instanceconfig[k] = v
|
instanceconfig[k] = v
|
||||||
|
|
||||||
instanceconfig["plugins"] = plugins
|
instanceconfig["plugins"] = plugins
|
||||||
|
if "--verbose" in sys.argv:
|
||||||
|
instanceconfig["verbose"] = True
|
||||||
|
|
||||||
instanceconfig["name"] = "%s-%s" % (instancename, portinstance)
|
instanceconfig["name"] = "%s-%s" % (instancename, portinstance)
|
||||||
instanceconfig["expanded_port"] = portinstance
|
instanceconfig["expanded_port"] = portinstance
|
||||||
|
|
Loading…
Reference in a new issue