Вопрос

I'm using Graphite in a test environment where I run several tests of limited duration. I've set up several dashboards that contain the general information I want to see, but it would be handy if I could specify the time range for a specific test in the HTTP request to show the dashboard. I know this is supported for individual graphs, but is there any way to do this for an entire dashboard?

What I have in mind is using a dashboard URL that looks something like this:

http://graphite:8000/dashboard/adserver?from=18%3A06_20111201&until=18%3A39_20111202

Thanks!

-Travis

Это было полезно?

Решение

I've had a look at the graphite code, and it doesn't look like the dashboard view accepts from or until parameters for the dashboard itself.

However, looking further into content/js/dashboard.js file - it picks up the defaultGraphParams from a cookie. You can perhaps manipulate your cookie to set the values you'd like. I'm not entirely sure how easy solution this might be though.

Another option is to monkey-patch the javascript file and override the defaultGraphParams from the URL query itself (or maybe even submit this as an enhancement to the graphite project...)

Lastly, there are several good 3rd party open-source graphite dashboards out there, some of them might do that. I believe gdash supports custom from/to fields. (shameless plug) My dashboard giraffe does not currently support it, but it could be an interesting feature request.

Другие советы

(maybe a late answer to your question, but still, might be wroth) If you are using render URI then you can specify a date range, at least according to the doc

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top