One minute
OpenShift: Applying custom AlertManager Configuration
You can overwrite the default Alertmanager configuration by editing the alertmanager-main secret inside the openshift-monitoring namespace.
- Print the currently active Alertmanager configuration into file alertmanager.yaml:
oc -n openshift-monitoring get secret alertmanager-main --template='{{ index .data "alertmanager.yaml" }}' |base64 -d > alertmanager.yaml
Change the configuration in file alertmanager.yaml to your new configuration
Apply the new configuration in the file:
oc -n openshift-monitoring create secret generic alertmanager-main --from-file=alertmanager.yaml --dry-run -o=yaml | oc -n openshift-monitoring replace secret --filename=-