Solved

Prism Alerts - old

  • 16 October 2019
  • 4 replies
  • 1411 views

How do clean old Prism Alerts.  Within Webconsole Resolve and Acknowlege doesnt clean old alerts.  Any command would helpful.  Thanks, 

 

 

icon

Best answer by RAMAKRISHNA PILLAI ANEESH 16 October 2019, 17:29

View original

This topic has been closed for comments

4 replies

Userlevel 3
Badge +5

Hi

 

Try to NCLI with the following script:-

 

for alert in `ncli alert ls | grep ID | awk ‘{print $3}’`;  do echo “Resolving alert $alert”;  ncli alert resolve ids=$alert; sleep 2; done

 

or

 

Manually clear the alerts from SSH and restart the service:-

 

allssh genesis stop alert_manager
alert_tool -op clear-alerts
allssh 'rm ~/data/alert_manager/wals/*'
cluster start

 

WARNING:- DO NOT treat the Nutanix CVM (Controller VM) as a normal Linux machine. DO NOT perform "rm -rf /home" on any of the CVMs. It could lead to data loss scenarios. Contact Nutanix Support in case you have any doubts.

 

Thanks

Userlevel 4
Badge +5

Hi @Tashi 
Can you follow the public KB mentioned below 
https://portal.nutanix.com/#/page/kbs/details?targetId=kA0600000008cOXCAY

If you’re still facing the issue, can you post the snippet of the command you’re executing and the error you’re receiving and the AOS version you’re using?
 

This command doesn’t work - tired on one of CVM - giving syntax error 

Userlevel 3
Badge +5

Hi

 

nutanix@cvm$ for alert in `ncli alert ls | grep ID | awk '{print $3}'`; do echo "Resolving alert $alert"; \ncli alert resolve ids=$alert; sleep 2; done

 

Refer the following discussion:-

https://next.nutanix.com/prism-infrastructure-management-26/how-do-i-clear-old-alerts-31269