Using Graphite, I'm plotting some graph and the same with a time shift.
Eg:
aliasByNode(my.application.metric.$Continent.$DC.*, 4, 5, 3)
aliasByNode(timeShift(my.application.metric.$Continent.$DC.*, "7d"), 4, 5, 3)
But I'd like to be able to identify the graphs (they currently get the same name).
How to add a prefix or a suffix (or any marker) to a metric alias?
Eg:
-- EU.PAR.pokemonCaught
-- EU.PAR.pokemonCaught (last week)
Use regex with aliasSub
to grab whole ( (.*)
) metric and change it - add desired text ( \1 last week
). E.g.
aliasByNode(timeShift(my.application.metric.$Continent.$DC.*, "7d"), 4, 5, 3)
should look like
aliasSub(aliasByNode(timeShift(my.application.metric.$Continent.$DC.*, "7d"), 4, 5, 3), "(.*)", "\1 last week")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With