Prism Alerts - old | Nutanix Community
Skip to main content
Solved

Prism Alerts - old

  • October 16, 2019
  • 4 replies
  • 1455 views

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

 

 

Best answer by RAMAKRISHNA PILLAI ANEESH

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

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

4 replies

RAMAKRISHNA PILLAI ANEESH
Forum|alt.badge.img+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


  • Author
  • Voyager
  • 1 reply
  • October 17, 2019

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


HITESH0801
Nutanix Employee
Forum|alt.badge.img+5
  • Nutanix Employee
  • 104 replies
  • October 17, 2019

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?
 


RAMAKRISHNA PILLAI ANEESH
Forum|alt.badge.img+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