vimeo / graph-explorer

A graphite dashboard powered by structured metrics
http://vimeo.github.io/graph-explorer/
Apache License 2.0
1.06k stars 93 forks source link

suggestion/autocomplete interface #125

Open Dieterbe opened 9 years ago

Dieterbe commented 9 years ago

It would be nice if GE could assist more in composing a query.

I think a big help here would be ES facets or whatever they're called. Basically whenever you already have a pattern (such as a 'key=val' or 'key:val' expression), based on that, we can suggest all possible other key=val patterns of all metrics matching the first expression, and provide keyboard completion to narrow it down, then once we have 2 patterns, show futher patterns for the tag values that appear in all metrics matching those two conditions, and so on until we have enough conditions in which case we can do the usual graphing.

There will be a huge list of options though, especially to fill in the starting criteria. But i think for that, we can just have the user enter a string, any string, that should match some part of the metric id or tag key/values, they should be able to do this without assistance. Also I'm thinking, to start, we could present a list of all units. Because unit is a mandatory tag, we can start from there to narrow down. But that can get tricky because if you're looking for something in unit=s but the metric is in ms, although we already have code for that in place so we could use base units here, but also the unit might be unknown if it couldn't be parsed by a structured_metrics plugin (other than the catchall).

I think this would be really useful, especially for newcomers, from what I can gather this is one of the main hurdles. But I'm not good at frontend/UX stuff.. anyone interested in trying this out?