We have a lot of sites, so I use a tcl script to iterate all sites and ‘disable’ each alert that is part of an alert group named ‘maint’ for maintenance. Alert groups can be defined for each alert. After the downtime, I then run the script again, except I change the line word disable to enable in the last if statement.
I actually refactored this from a script that Jim has shared before on this forum, so many thank Jim. Goes to show how valuable this forum is.
I plan to make this executable and able to be scheduled from CRON or advanced scheduler thread when we upgrade to 20.1.
For now however, I open a hcitcl prompt and execute this:
#########################################
global hciRoot
set hciRoot $env(HCIROOT)
#set hciRoot $hcr
set siteList “”
# Add code here to search for siteInfo, then for each site
set fileList [glob -nocomplain ${hciRoot}/**/siteInfo]
foreach fileName $fileList {
set lindexvar [expr [llength [file split $fileName]] – 2]
set siteName [lindex [file split $fileName] $lindexvar]
lappend siteList $siteName
}
foreach site $siteList {
if {$site ne {siteProto}} {
echo $site
if {[catch {exec hcicmd -s $site -t d -c {disable group maint}} output]} {
echo “ERROR:$output”
}
}
}