team_dashboard
team_dashboard copied to clipboard
When using graph with graphite, from and until show how doesnt render anything when the period is smaller 12 hours.
graphite:8080/render?from=11%3A23_20131031&until=11%3A53_20131031&format=json&target=collectd.mysql02_servername_lan.mysql.prtg.mysql_commands.%2A
When using graph with graphite, from and until somehow doesnt render anything when the period is smaller 12 hours.
So i opened development.log to see what is wrong, I just cant understand why. But what does work is using ;
from=-5minutes from=-2hours etc
Anyways I am editing the source to use that instead, its recommended on graphite site. But really dont understand why from and until doesnt work for smaller periods.
Nice finding!
Just wondering if anyone else have the same problem, so i can flag this bug at Graphite
I actually had the same issue when working on the new graphite widget, but didn't follow up on it with the Graphite Web project.
On Fri, Nov 1, 2013 at 12:25 PM, laapsaap [email protected] wrote:
Just wondering if anyone else have the same problem, so i can flag this bug at Graphite
— Reply to this email directly or view it on GitHubhttps://github.com/fdietz/team_dashboard/issues/112#issuecomment-27559746 .
I'm getting this too - look at the URL - for some reason it's requesting %3A
which is an HTML character code for a colon : instead of just using a colon.
What part of the code did you edit to fix it?
Answering myself, and leaving this so others that might find it:
I edited team_dashboard/app/models/graphite_url_builder.rb
, and changed this section:
def datapoints_svg_url(targets, from, to, options = {})
query = []
query << Array(targets).reject(&:blank?).map { |t| "target=#{CGI.escape(t)}" }
query << "from=#{CGI.escape(format(from))}"
query << "until=#{CGI.escape(format(to))}"
to:
def datapoints_svg_url(targets, from, to, options = {})
query = []
query << Array(targets).reject(&:blank?).map { |t| "target=#{CGI.escape(t)}" }
query << "from=-2hours"
query << "until=now"
There's probably a better way of doing this, but I needed it to work quickly for a demo :grin: