layer of indirection for target groups?

Asked by Adam Fritzler

I use graphite on Amazon EC2, so my group of production targets (instanceIds in the metric names) changes over time. I'd like to not have to rebuild the graphs every time my production set changes. Is there a way to define a group of metrics that I can reference abstractly in graph definitions, and maintain through some other method? It seems like this probably exists but like many thing in graphite, not documented :)

eg, say there was a table that had a group definition:
   INSERT INTO account_metricgroups (user=1, name="prodweb", metrics="i-XXXXXX.cpu_sys,i-YYYYYY.cpu_sys")

then users could define a graph like:

which would always resolve prodweb to whatever list of metrics were defined in the group list.

I currently solve this by pushing a new set of statically defined graphs into the account_mygraph table for a fake user every time my EC2 config changes, which is such a horrifying solution I can't believe I just admitted to it.

Question information

English Edit question
Graphite Edit question
No assignee Edit question
Solved by:
Dave Rawks
Last query:
Last reply:
Revision history for this message
Best Dave Rawks (drawks) said :

Symlinks work great for this. I frequently group stats together by making symlinks on the server which holds the whipser files so that I can group hosts and/or stats in arbitrary ways. You can then cron/script your symlink management to run against a system database or whatever if you'd like to automate the mapping.

Revision history for this message
Adam Fritzler (mid-zigamorph) said :

Clever! Then use wildcards in the graphs everywhere. I like it. I'll github some scripts soon to do this for ec2.

Revision history for this message
Adam Fritzler (mid-zigamorph) said :

Thanks Dave Rawks, that solved my question.

Revision history for this message
Lucio Torre (lucio.torre) said :

I solve this issue by giving names like production-server-1 to each server. I just need to make sure after restarting everything that no two servers get the same name.