How to Exclude alarms for specific text from the Agent Error log?

Hi Guys,

​ENV:

FMS: 5.7.5.6
Sybase: 5.5.8.47
​Sybase ASE: 15.0.3

PROBLEM DESCRIPTION:

Note: This is about customizing the Agent_Error_Messages rule.

Customer is receiving an alarm for the below error found in the Agent Error logs

Collection [TopSQL_callback] is ready to run but the following items will not be collected: [Top Hash dashboard] [Top Hash dashboard] [Top Hash dashboard]

This is found to be an issue with the sybase version and there is no enhancement planned. Customer is advised to exclude this error in the rule condition inorder to stop receiving these alarms.

Customer copied the default rule and trying to customize with the attached script. A couple of line has been included in the rule condition. However it does not work as expected and the rule still triggers an alarm.

Rule Condition is attached below.

Any ideas or suggestions on the attached script?

Thanks
Andrew

 

script_sybase.txt
q = #server_name from Sybase_MDA_SybaseServerStatus where agent = $scope.agent# ;
try {
obj = q.topologyObjects[0];
sName = q.values( obj )[0].value
} catch (e) { sName = "" }

checkObservationAlarms(#Sybase_MDA_AgentErrorMessages for 1 ms#,
 {entry ->

if(entry.get("msg_source") == "is_coll_ready_run" && entry.get("msg_text") == "Collection [TopSQL_callback] is ready to run but the following items will not be collected: [Top Hash dashboard] [Top Hash dashboard] [Top Hash dashboard]") 
{ return 0; } 

 if (entry.get("msg_severity") =="WARNING") { 
   return 2;
 }
 if (entry.get("msg_severity") =="CRITICAL") { 
   return 3;
 }
 if (entry.get("msg_severity") =="FATAL") { 
   return 4;
 }
   return 0;
 },
{entry, severity -> switch(severity) {
 case 2:
 return "Sybase ASE " + sName + ": " + entry.get("msg_source") + " " + entry.get("msg_text") + "";
 case 3:
 return "Sybase ASE " + sName + ": " + entry.get("msg_source") + " " + entry.get("msg_text") + "";
 case 4:
 return "Sybase ASE " + sName + ": " + entry.get("msg_source") + " " + entry.get("msg_text") + "";
default:
 return "";
 } },"2855f780-502a-421c-8836-3c498fa70b52").size() > 0;