Is it possible to add a default metric to every graph?

Asked by Andrew Petersen

I would like every graph on a particular dashboard to include our deploy events, drawn as an infinite line. Since it's really hard to add another metric to an existing graph (only way I know of is to drag-merge two graphs together), and I have a bunch of existing combination graphs, it would be very nice to be able to specify a list of targets to add to each graph. For example: drawAsInfinite(stats.deploys.web.live).

Is this possible, short of hacking my own ajax call or manually editing the sql3 db?

Question information

Language:
English Edit question
Status:
Answered
For:
Graphite Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

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

There is actually a good way to do this but unfortunately I put in a specific check to make it not work :/

The default graph parameters would be the way to do it but because I wanted to avoid people accidentally pooching their dashboards I put code in to make sure the 'from', 'until', 'target' (and maybe a couple others) parameters would not be affected by the user-defined default parameters. I'd suggest just disabling that check and seeing what happens (no guarantees that other bugs won't arise, I have not tested anything this way). To do so, look for a list called NOT_EDITABLE in webapp/content/js/dashboard.js and make it empty. Then you should be able to add target=whatever as a default parameter and in theory it should appear on all graphs. Again though, this might not work at all or break horribly :)

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

Thanks for the suggestion!

Unfortunately, removing target from the NOT_EDITABLE array didn't work. Nothing broke, but that param is still not showing up.

The dashboard is so powerful for quickly composing and browsing graphs, but for something like this I'm thinking I may need to write specific dashboards using something like etsy-dashboard... but you lose the flexibility of the composer interface.

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

In that case I'd say file a bug, there isn't a good way to do this without designing it in.

Can you help with this problem?

Provide an answer of your own, or ask Andrew Petersen for more information if necessary.

To post a message you must log in.