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 220.127.116.11-5520096 release))
Type "help" for help.
2. vcopsdb=> truncate table alarm cascade;
3. vcopsdb=> truncate table alert cascade;
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