OpenShift - List Alert Manager Silenced Alerts using amtool

by
Jeremy Canfield |
Updated: February 20 2025
| OpenShift articles
If you are not familiar with the oc command, refer to OpenShift - Getting Started with the oc command.
Alert Manager, as the name implies, does things like receive alerts from a client (such as Prometheus) and routing alerts to certain targets, such as an SMTP email server or OpsGenie. Alert Manager also has some features such as being able to silence alerts for a period of time.
In the openshift-monitoring namespace, there should be one or more alertmanager pods.
~]$ oc get pods --namespace openshift-monitoring
NAME READY STATUS RESTARTS AGE
alertmanager-main-0 6/6 Running 0 6d10h
alertmanager-main-1 6/6 Running 1 (6d10h ago) 6d10h
The oc exec command can be used to run the amtool CLI in one of the alertmanager pods. The amtool silence command can be used to list the silenced alerts.
~]$ oc exec pod/alertmanager-main-0 --namespace openshift-monitoring -- amtool silence --alertmanager.url="http://localhost:9093"
ID Matchers Ends At Created By Comment
d86e8aa8-91f3-463d-a34a-daf530682f38 alertname="FluentdNodeDown" 2024-01-20 09:29:29 UTC john.doe temporarily silencing this alert for 1 day
Or, the amtool alert command with the --silenced flag can be used.
~]$ oc exec pod/alertmanager-main-0 --namespace openshift-monitoring -- amtool --alertmanager.url="http://localhost:9093" alert --silenced
ID Matchers Ends At Created By Comment
d86e8aa8-91f3-463d-a34a-daf530682f38 alertname="FluentdNodeDown" 2024-01-20 09:29:29 UTC john.doe temporarily silencing this alert for 1 day
Did you find this article helpful?
If so, consider buying me a coffee over at