Fix from time
This commit is contained in:
parent
cbe74cd2e8
commit
d10218343d
@ -8,7 +8,7 @@ import requests
|
|||||||
def getGraphiteValue(host, port, target, from_time, to_time):
|
def getGraphiteValue(host, port, target, from_time, to_time):
|
||||||
|
|
||||||
request_url = 'http://' + host + ':' + str(port) + '/render'
|
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)
|
r = requests.get(request_url, params=ranges)
|
||||||
@ -71,7 +71,7 @@ class GraphiteMetricCheck(SensuPluginCheck):
|
|||||||
'--from_time',
|
'--from_time',
|
||||||
default='-5min',
|
default='-5min',
|
||||||
type=str,
|
type=str,
|
||||||
help='from time. Default = -5min'
|
help='from time. without -. Example: -f 15h. Default value: -5min'
|
||||||
)
|
)
|
||||||
self.parser.add_argument(
|
self.parser.add_argument(
|
||||||
'-o',
|
'-o',
|
||||||
|
Loading…
Reference in New Issue
Block a user