PowerFlex 4.X: How to Clear Acknowledged Alerts
Summary: An acknowledged alert cannot be cleared using the PowerFlex Presentation Server.
Instructions
When an acknowledged alert has not been cleared, run step #1, and if not cleared, then run step #2.
Step #1 - Clear alerts using REST API
Run the following steps and commands:
1. Add environment variables; hostname of the system, username, and password.
2. Add a token environment variable for session connection and access.
3. Add an alert ID variable scheduled to be cleared - must be updated for each alert separately.
4. Run a POST call to clear the alert ID. An alert ID can be found in the Alerts section in the Alert Id column:
Example:
# INGRESS_IP=<Ingress IP>
# INGRESS_USER=<Username>
# INGRESS_PASSWORD=<Password>
# TOKEN=$(curl -s -k --location --request POST https://${INGRESS_IP}/rest/auth/login --header "Accept: application/json" --header "Content-Type: application/json" --data "{\"username\": \"${INGRESS_USER}\",\"password\": \"${INGRESS_PASSWORD}\"}")
# ACCESS_TOKEN=$(echo "${TOKEN}" | jq -r .access_token)
# ALERT_ID=<Alert ID>
# curl -i --insecure -X POST https://${INGRESS_IP}/rest/v1/alerts/${ALERT_ID}/clear -H "accept: application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}"
HTTP/2 204
date: Tue, 15 Nov 2022 22:41:47 GMT
strict-transport-security: max-age=15724800; includeSubDomains
Step #2 - Respawn the Gateway and Presentation Server Pods
Gateway and Presentation Server are services that are running on Kubernetes (K8s) pods in PowerFlex v4.0.
To resolve the alert that has been acknowledged, the pods must be respawned.
1. Verify that the Gateway and Presentation Server services are running:
kubectl get pods -n powerflex -o wide | grep "block" | grep -v "mds"
Example:
# kubectl get pods -n powerflex -o wide | grep "block" | grep -v "mds"
block-legacy-gateway-dcc96f887-tjhk6 1/1 Running 0 15d 10.42.0.53 mno2 <none> <none>
powerflex-block-frontend-857874f576-8cf4f 1/1 Running 0 15d 10.42.1.79 mno3 <none> <none>
powerflex-block-presentationservice-5f9cc48d77-b8mvq 1/1 Running 0 15d 10.42.0.50 mno2 <none> <none>
2. Respawn the Gateway and Presentation Server services:
kubectl get pods -n powerflex -o wide | grep "block" | grep -v "mds" | while read pod; do kubectl delete pod -n powerflex "${pod}"; done
Example:
# kubectl get pods -n powerflex -o wide | grep "block" | grep -v "mds" | while read pod; do kubectl delete pod -n powerflex "${pod}"; done
pod "block-legacy-gateway-dcc96f887-tjhk6" deleted
pod "powerflex-block-frontend-857874f576-8cf4f" deleted
pod "powerflex-block-presentationservice-5f9cc48d77-b8mvq" deleted