Skip to content

Instantly share code, notes, and snippets.

@smallnest
Created June 5, 2019 11:47
Show Gist options
  • Select an option

  • Save smallnest/a12d698f34e52da7dc6e2ec4565322f4 to your computer and use it in GitHub Desktop.

Select an option

Save smallnest/a12d698f34e52da7dc6e2ec4565322f4 to your computer and use it in GitHub Desktop.

alias for series

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")
@smallnest

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment