1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

aliases: add alert/silence alertmanager/amtool shorthands

Signed-off-by: Joe Groocock <me@frebib.net>
This commit is contained in:
Joe Groocock 2020-08-11 09:30:48 +01:00
parent 49b5924f14
commit 7b8191b737
Signed by: frebib
GPG Key ID: E0B16BEACFBB6A86

View File

@ -304,4 +304,10 @@ alias rot13="tr '[A-Za-z]' '[N-ZA-Mn-za-m]'"
alias ipa="ip a"
alias addrs="ip a | grep inet | grep -ve fe80 -e '127\\.0\\.0\\.1/8' -e '::1/128' | sort -n | sed 's/^\\s*//'"
# alertmanager
alias alert='amtool alert'
alias silence='amtool silence'
alias expire='amtool silence expire'
unsilence() { { for inst in "$@"; do amtool silence query instance=$inst | grep -Po '^([0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12})' | tee /dev/stderr | xargs -r amtool silence expire & done; wait; } | cat }
# vim: ft=sh