Yes, there is. Use mquery with -s DELETE. In your example
mquery -w "CLASS: == foo" -s DELETE
Deletes all events and returns the number of events deleted.
Yes this is quite simple.
See below some examples:
mquery -n CELLNAME -a PATROL_EV -w 'status: == CLOSED, msg: == test ' -s DELETE
mquery -n CELLNAME -a PATROL_EV -s DELETE -w "status: == CLOSED, severity: == OK, mc_origin: == testcell, mc_host: =='losborn.bmc.com', event_handle: == 7086"
Thanks everyone for your help!!!!!!!!
does anyone know in which guide the CLI commands for cells are described?
Thanks in advance,
BMC Impact Solutions
you can check mquery cli.
What I normally do is write an MRL statement that matches any event, this then sets the status of all the events I don't want to closed. Then manually trigger an event. Don't forget to remove the statement once the work is done. Something else you might consider is closing events older than x days on receipt of any event as a temporary measure until you can stop these events being sent. Jon
Sent from my iPhone