Belajar Sendiri

Commands

amtool silence add

amtool silence add <label=value>… --duration=<time> --author=<name> --comment=<why> [--alertmanager.url=<url>]

Risk: Careful

What it does

Mutes matching alerts until the time runs out. Prints the silence ID.

When to use it

Planned work, or while you are already fixing it. Always give a reason and a short time.

Example

$ amtool --alertmanager.url=http://localhost:9093 silence add alertname=QueueTooLong --duration=2h --author=aina --comment="Fixing the queue"

No calls about the queue for 2 hours: Aina is on it.

$ amtool --alertmanager.url=http://localhost:9093 silence query

List the silences: who, why, and when they end.

$ amtool --alertmanager.url=http://localhost:9093 silence expire <id>

End a silence early, when the work is done.