Reputation: 1909
In order to generate graphs in graphite, i am using the URL render API. My URL is of the form-
<IP>/render?&target=stats.beta.*.ip-10-0-0-179.counter.ant.*.*.succeeded&title=Notification&lineMode=connected
The graph does have a title, but the individual five lines do not have any alias. The alias function doesn't work with wildcards.
Upvotes: 2
Views: 1884
Reputation: 32388
aliasByNode(seriesList, *nodes)
works with wildcards. The function name is quite confusing, it simply splits the key by dots and takes i-th value specified as second argument. It is indexed from 0.
&target=aliasByNode(ganglia.*.cpu*.load5, 1)
^
\ name the series by this part
you can specify multiple parts to use as a lengend:
aliasByNode(localhost.*.cpu-{system,user,wait}),0,2)
^ ^
\-----------\-should take these two -> 'localhost-cpu-system'
Upvotes: 1
Reputation: 293
If you want to alias wildcards, you should use the aliasByNode() function. And as was mentioned by talonx, combine that with hidelegend
Upvotes: 0