i want to exclude certain objects from Alerts in an easy way using Labels (i guess that is the most easy way).
Let's say i want to exclude some VMs from the "Guest storage space utilization" alert. I can add a label called "ExcludeFromGuestStorageSpaceUtilization" and set that to "True" for the VMs i want to exclude.
But then i need to change the Query for the alert to have an exclusion for all VMs where ExcludeFromGuestStorageSpaceUtilization does not equals True. How do i query this (so i need to basically do a NOT EQUALS or something like that).
I can't set the query to all VMs where ExcludeFromGuestStorageSpaceUtilization equals False because that will mean i have to set this property on all other VMs that i don't want to exclude and that's pretty labour intensive...
In case you are still looking for the answer, the scope definition for Guest Storage Space Utilization alert should be as follows (considering you have set a label to vm as you mentioned above):
vm.powerstate:poweredOn AND vm.vol.freeSpacePercentage:[0 TO 5] AND -ExcludeFromGuestStorageSpaceUtilization:True