Need help with trying to mod a alert rule using Groovy using perl

Hello, the stock rule just alerts on high tbl space and sends email to support. But it does it for all tbl spaces. Need to exclude from the alerting all table spaces that end in TEMP and all that begin with UNDO. The below syntax is bad according to the checker. I was hoping to use Perl's pattern-binding operator. This is my first attempt at modifying a rule so didnt expect it to work right off. but I don't want to have to itemize each tablespace in a list and then spin through the list in a if statement. Is there a way to get the below code to work? I put my mods to the stock rule in red below.   DBO - Tablespace Used Percentage  (cartridge   DB_ORACLE_UI)

//Custom Rule to exclude tablespaces that don't need to be alerted on
// 072919  sjb  New
condition = (#DBO_allocated_space_used_pct_for_rules# >= registry("DBO_TablespaceStorage-AllocatedUsedPct_High")) && @tablespaceName !~ /TEMP$/ && @tablespaceName !~ /^UNDO/ ;
return DBWC_RacAndSingleInstanceRuleFilter(scope, "DBO - Tablespace Used Percentage", "4", condition);

Parents Reply Children