Greetings,
We are running both CIS5.7R2 and CIS5.8R4 and the following groups of commands using hcicmd do work with a caveat:
disable disable alert commands list :: disable all/alert/group/config
disable all disable all alerts :: disable all
disable alert disable alert by name :: disable alert
disable group disable alert by named group :: disable group
disable config disable alert by alert file :: disable config
enable enable alert commands list :: enable all/alert/group/config
enable all enable all alerts :: enable all
enable alert enable alert by name :: enable alert
enable group enable alert by named group :: enable group
enable config enable alert by alert file :: enable config
The caveat is: once you enable alerts any “last read” and “last write” alerts will fire falsely. It is as if the engine retained the stats on these guys and once enabled fired them off. I had reported this as a Lawson Case and also raised it as an issue at CUE11. Don’t have a current status on any planned fixes or priority here.
We do use Robert’s method of a “downtime.alrt” file that is empty. We use a function call to do “alertsdown” and then “alertsup” which refreshes the default.alrt file with a backup copy. This is used for Cloverleaf downtimes before a failover event.
Also: developed a script (ksh93) with hcitcl to allow us to selectively remove and then restore groups of alerts. This is used for selective application downtimes only. The script is run interactively.
Basically, with these Cloverleaf versions the alerts in default.alrt are keyed now. It is a bit tricky to find and remove ALERT entries but our extractor works like a charm. We pass an argument of group(s) to remove; store them into a file; then for the restore we cat this file back to the existing default.alrt file. In this way, someone may have updated the master – default.alrt – and we don’t want to blow away later updates here.
If you like I can post the “alert extractor” code for you to examine.
A few approaches.
And, then there is the “comment out” feature for 5.8R4 which we have NOT explored but may be another option to crank some code around.
Have fun!
Hope this helps.