Open inno-ron opened 6 years ago
Can you please reference a specific check I am not seeing a --until
option.
hi @majormoses , I am referring to check-graphite-data but the issue is in the core code that retrieving the graphite url of a check. If you'll check out lib/sensu-plugins-graphite/graphite_proxy/proxy.rb
you would see the following line in retrieve_data function, on line 82:
url = "#{config[:server]}/render?format=json&target=#{formatted_target}&from=#{config[:from]}"
this url missing the following: &until=#{config[:until]}
and therefor whoever passes a --until to the check-graphite-data command doesn't affect the check url itself.
I see, thanks for clarifying. I validated your findings are correct and should be pretty easy to fix. Any chance you would be willing to submit a PR to fix this?
@majormoses sure thing. will ping here when done.
@majormoses pull request has been created #60
Seems like the SensuPluginsGraphite::GraphiteProxy.retrieve_data! does not taking the config[:until] value when building the url.
Aka, running a graphite check with
--target 'my.metric&until=-2hours
isn't like running--target 'my.metric' --until -2hours