Reputation: 2918
lets imagine i'm having this query in graphite:
level1.level2.*.level4.count
and I want my alias to be
level is: level3
but simply I can't find the way.
After reading graphite docs for few hours, I still can't find simple way to do it.
Even more challenging would be to do regex function ex:
aliasByRegex(
query,
'level is: level$1',
'/level2.level[0-9].level4/')
Is it possible to do something like this in graphite?
Upvotes: 3
Views: 2332
Reputation: 12587
You can simply use aliasByNode to extract the exact level and then aliasSub
aliasSub(aliasByNode(level1.level2.*.level4, 2), "(.*)", "level is \1")
Of course you could use aliasSub alone, but imo it would make the regex the way complicated.
Upvotes: 4