amtool 操作静默
amtool 操作静默
# 创建 2 小时静默(变更窗口)
amtool silence add --alertmanager.url=http://127.0.0.1:9093 --author=deploy-bot --comment="order-svc 发布至 11:00" --duration=2h 'service="order-svc"'
# 查询活动与已过期静默
amtool silence query --alertmanager.url=http://127.0.0.1:9093
amtool silence query --alertmanager.url=http://127.0.0.1:9093 --expired
# 提前撤销
amtool silence expire --alertmanager.url=http://127.0.0.1:9093 <silence-id>comment 写成“工单号 + 变更名”的可检索格式,到期复盘时能与变更记录对账。