How to change the severity level of a simple rule from critical to fatal?
RESOLUTION 1 *For SQL Server, Oracle, and DB2 database agents*
Please refer to Knowledgebase article 151983
RESOLUTION 2 *For other types of Foglight agents*
Open the rule that needs to be changed and open the "Fire" area. Now click on the "Condition" tab. In the function "checkObservationAlarms()" go to the critical definition and change it from 3 to 4.
Example Sybase rule "RS_ThreadsDown":
Original:
checkObservationAlarms(#Sybase_RS_RS_ThreadsDownDetail for 1 ms#,
{entry ->
if ((entry.get("state").trim() == "Down") && ((entry.get("name").trim() != "DSI") && (entry.get("name").trim() != "DIST") && (entry.get("name").trim() != "SQM") && (entry.get("name").trim() != "REP AGENT"))) {
return 2;
}
if ((entry.get("state").trim() == "Down") && ((entry.get("name").trim() == "DSI") || (entry.get("name").trim() == "DIST") || (entry.get("name").trim() == "SQM") || (entry.get("name").trim() == "REP AGENT"))) {
return 3;
}
return 0;
},
{entry, severity -> switch(severity) {
case 2:
return "Sybase_RS " + {table = scope.get('agent').getList('tables').find({it.getType().getName()=='Sybase_RS_RS_Info'}); return (table != null) ? table.get('rs_name') : null;}.call() + ": Thread '" + entry.get("name") + "' is " + entry.get("state") + ", Info: " + entry.get("info") + "";
case 3:
return "Sybase_RS " + {table = scope.get('agent').getList('tables').find({it.getType().getName()=='Sybase_RS_RS_Info'}); return (table != null) ? table.get('rs_name') : null;}.call() + ": Thread '" + entry.get("name") + "' is " + entry.get("state") + ", Info: " + entry.get("info") + "";
default:
return "";
} },"b6ea3221571000137d92ce9cd118a2fe").size() > 0;
Changed:
checkObservationAlarms(#Sybase_RS_RS_ThreadsDownDetail for 1 ms#,
{entry ->
if ((entry.get("state").trim() == "Down") && ((entry.get("name").trim() != "DSI") && (entry.get("name").trim() != "DIST") && (entry.get("name").trim() != "SQM") && (entry.get("name").trim() != "REP AGENT"))) {
return 2;
}
if ((entry.get("state").trim() == "Down") && ((entry.get("name").trim() == "DSI") || (entry.get("name").trim() == "DIST") || (entry.get("name").trim() == "SQM") || (entry.get("name").trim() == "REP AGENT"))) {
return 4;
}
return 0;
},
{entry, severity -> switch(severity) {
case 2:
return "Sybase_RS " + {table = scope.get('agent').getList('tables').find({it.getType().getName()=='Sybase_RS_RS_Info'}); return (table != null) ? table.get('rs_name') : null;}.call() + ": Thread '" + entry.get("name") + "' is " + entry.get("state") + ", Info: " + entry.get("info") + "";
case 4:
return "Sybase_RS " + {table = scope.get('agent').getList('tables').find({it.getType().getName()=='Sybase_RS_RS_Info'}); return (table != null) ? table.get('rs_name') : null;}.call() + ": Thread '" + entry.get("name") + "' is " + entry.get("state") + ", Info: " + entry.get("info") + "";
default:
return "";
} },"b6ea3221571000137d92ce9cd118a2fe").size() > 0;
When done click on "Save all" at the bottom of the dashboard to save the changes.
Next go to "Severity Level Variables" tab and click on the variable "Text". Right hand side in the "Expression/Message" field the function "createObservationAlarms()" appears.
Do the same changes like above in the function "createObservationAlarms()". When finish the modification click on the "Add" button to apply the change.
Finally click on "Save all" at the bottom of the dashboard to save the changes.
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center