Possible to combine graphs on the dashboard?

Asked by Andrew Petersen

I would like to create a dashboard with a few complex graphs, for example, a graph that combines database query types, stacked. I can create a graph like this in the composer, but is there a way to include a graph like this on a dashboard?

Question information

Language:
English Edit question
Status:
Solved
For:
Graphite Edit question
Assignee:
No assignee Edit question
Solved by:
Andrew Petersen
Solved:
Last query:
Last reply:
Revision history for this message
chrismd (chrismd) said :
#1

The dashboard (in 0.9.9) supports all of the same functions as the composer, left-click a graph for the menus of options and functions. You can put multiple metrics in a single graph on the dashboard in two different ways.

First off you can simply drag'n'drop one graph onto another to combine them into one graph. The default drag'n'drop behavior is to move the graph but if you hover for a moment over the target graph it will switch to merge mode. So drag-hover-drop.

If you have a lot of metrics to work with, you should switch to 'Completer' mode (under Dashboard menu, Configure UI). I am going to make this the default in the next release because it is so much better than the tree. You just type in metric paths, you can use * to match multiple results (hitting alt-enter will add all the resulting graphs to the dashboard, alt-backspace removes them) but since a graph gets created for each result, you'd have to do a ton of drag'n'drop which is no fun. So you can use \* to preserve the wildcard in the results, this effectively functions as a "group by" operator by creating a graph that uses the wildcard rather than the wildcard resulting in many graphs.

Revision history for this message
Andrew Petersen (kirbysayshi) said :
#2

Thank you for the help!

I was able to get the drag-hover-drop working, but not the \* wildcard.

For example, I have the following counts:

stats.core.cache.fast
stats.core.cache.miss
stats.core.cache.read
stats.core.cache.write

when I type:

stats.core.cache.\*

and press alt-enter, nothing happens. Pressing alt-backspace will delete and leave just stats.core.. Clicking the entry in the suggestion in the list will add the combined graph to the dashboard.

Revision history for this message
chrismd (chrismd) said :
#3

Does alt-enter work when you don't use \*? The keybindings are configurable so it might be set differently (I'm pretty sure alt-enter is the default). You're on 0.9.9 right? Does alt-enter work with 'stats.core.cache.*' in the box? It should add a graph for each matching metric in that case.

Revision history for this message
Andrew Petersen (kirbysayshi) said :
#4

No, alt-enter definitely doesn't work in any situation. I haven't changed the keybindings, but I am on a mac, if that matters. I'm using 0.9.9, and no, alt-enter on 'stats.core.cache.*' does not insert a graph for each matching metric.

Revision history for this message
chrismd (chrismd) said :
#5

Try the command/option button instead of alt, any luck? The keybindings are defined in /opt/graphite/conf/dashboard.conf, there should be an example file that shows the defaults. Let me know if any of the bindings work for you or if you can change them to values that do work.

Revision history for this message
Andrew Petersen (kirbysayshi) said :
#6

I've tried command/option, and various combos of them, none seem to work. I'll try fooling around with the conf file. Right now there is just the example file there, does there have to be a non-example one there to even have the defaults working?

What is weird is that alt+backspace does delete up to the previous period.

Revision history for this message
Andrew Petersen (kirbysayshi) said :
#7

I think I may have figured out why it wasn't working.

When I renamed /opt/graphite/conf/dashboard.conf.example to /opt/graphite/conf/dashboard.conf, alt+enter works!

So it looks like some of the defaults are defined inherently, and some aren't?

Either way, I believe this is fixed now. Thanks!