From d10218343d6b780b2215862a936795e6c61c3db8 Mon Sep 17 00:00:00 2001 From: Difrex Date: Wed, 9 Dec 2015 09:33:27 +0300 Subject: [PATCH] Fix from time --- plugins/graphite/graphite-metric-check.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/graphite/graphite-metric-check.py b/plugins/graphite/graphite-metric-check.py index bdfdef0..f56f262 100755 --- a/plugins/graphite/graphite-metric-check.py +++ b/plugins/graphite/graphite-metric-check.py @@ -8,7 +8,7 @@ import requests def getGraphiteValue(host, port, target, from_time, to_time): request_url = 'http://' + host + ':' + str(port) + '/render' - ranges = { 'from': from_time, 'to': to_time, 'target': target, 'format': 'json' } + ranges = { 'from': '-' + from_time, 'to': to_time, 'target': target, 'format': 'json' } r = requests.get(request_url, params=ranges) @@ -71,7 +71,7 @@ class GraphiteMetricCheck(SensuPluginCheck): '--from_time', default='-5min', type=str, - help='from time. Default = -5min' + help='from time. without -. Example: -f 15h. Default value: -5min' ) self.parser.add_argument( '-o',