--- Revision 306563623763 +++ Revision 636532383338 @@ -15,7 +15,7 @@ ... will monitor http response times to http://192.168.0.10/ If you wish to monitor the http response time to a particular page, use the -/etc/munin/plugin-conf.d/munin-node configuration file and add the following +/etc/munin/plugin-conf.d/munin-node CONFIGuration file and add the following section: [response_time_http*] @@ -34,7 +34,7 @@ from timeit import Timer -usage = """\ +USAGE = """\ To use this plugin, you must create a symbolic link to it, with the ip address or fqdn of the web server to monitor. @@ -43,7 +43,7 @@ ln -s /usr/share/node/node/plugins-auto/response_time_http_ \ /etc/munin/node.d/response_time_http_192.168.0.10""" -config = """\ +CONFIG = """\ graph_title HTTP GET response time for %s graph_vlabel seconds ping_http.label response time @@ -65,15 +65,16 @@ address = os.path.basename(argv[0]).replace('response_time_http_', '') if not address: - print(usage) + print(USAGE) return 1 if 'config' in sys.argv: - print(config % address) + print(CONFIG % address) else: runs = 10 if 'runs' in os.environ: - pings = os.environ['runs'] + runs = os.environ['runs'] + runs = int(runs) timeout = 5 if 'timeout' in os.environ: