I currently have 300,000 active alerts in VROPs. I would like to clear them all out and start fresh to see what I really need and dont need. How can this be accomplished?
I think your best way to do it is through the REST API. It may also be a good idea to disable all the alerts in your policy and then enable them one by one to make sure you dont just regenerate 300K of alerts again
Also try to use a little as possible the OOTB alerts and clone the symptoms and alert deff you want to a custom name.
just do this
1. su - postgres -c "/opt/vmware/vpostgres/9.3/bin/psql -U vcops -d vcopsdb"
Last login: Fri Feb 16 18:43:09 UTC 2018
psql.bin (9.3.16 (VMware Postgres 9.3.16.0-5520096 release))
Type "help" for help.
2. vcopsdb=> truncate table alarm cascade;
3. vcopsdb=> truncate table alert cascade;
Presumably these commands need to be run on all Analytics Nodes in a cluster, not just the Master?
Thanks.
There's a far simpler way that doesn't involve direct REST interaction or hand-editing of the database (which you should avoid unless under the guidance by VMware support). From the latest PowerCLI module which can be installed from the PowerShell gallery, login to vROps with Connect-OMServer. After that, it's a simple pipeline to get and cancel all active alerts:
Get-OMAlert -Status Active | Set-OMAlert -Cancel
Thanks for the reply! It worked.
This VMware KB is not as clear as your comment. VMware Knowledge Base