An environment has several datacenters with numerous databases.
Some of the DAGs have activation preferences enabled and set to a seven day delay because Microsoft recommended this to eliminate logical corruption or encryption type attached.
The cluster database replay queue length is data driven and is set to alarm if the queue length is more than five minutes.
Hundreds of alarms are fired. Can alarm be fired if the delay is more than five minutes and more than seven days?
Summary
Keep the default alarm condition and add another condition for a larger seven day delay in the rule
Please review the attached steps
1. Find the corresponding rule
2. Edit the rule
3. Support recommends to copying this rule because this cannot be overridden while upgrading the cartridge.
4. Go the “Condition & Actions ” tab to modify the condition
For Critical level, copy the following script into the critical condition field.
try
{
//please replace the "C:\\data\\DBNameList.txt" with the real path of the file
def file = new File("C:\\data\\DBNameList.txt")
def DBNameList=[]
file.eachLine("UTF-8"){
DBNameList.add(it?.trim())
}
if(scope?.database?.name in DBNameList){
return false
}
cluster = scope.get("parents")[0].get("cluster");
type = cluster.get("type");
if(type == "DAG"){
metric = #replayQueueLength for 5 minutes#
histo = histogram(metric, [7, 15])
if ((histo[2]/count(metric))>0.99)
{return true;}
else
{return false;}
}
}
catch (Exception e)
{
return false;
}
return false;
For the Warning condition, copy the following script into the warning condition field.
try
{
//please replace the "C:\\data\\DBNameList.txt" with the real path of the file
def file = new File("C:\\data\\DBNameList.txt")
def DBNameList=[]
file.eachLine("UTF-8"){
DBNameList.add(it?.trim())
}
if(scope?.database?.name in DBNameList){
return false
}
cluster = scope.get("parents")[0].get("cluster");
type = cluster.get("type");
if(type == "DAG"){
metric = #replayQueueLength for 5 minutes#
histo = histogram(metric, [7, 15])
if ((histo[1]/count(metric))>0.99)
{return true;}
else
{return false;}
}
}
catch (Exception e)
{
return false;
}
return false;
5. Save the rule
The rule can be found by filtering using "Non-Cartridge"
6. A text file called DBNames.txt file should listed the database names for the environment. This file needs to be stored for each condition and it is explained in each condition's code. Please replace the "C:\\data\\DBNames.txt" with the actual path of the file. More items can be added to the DBNames.txt. Please ensure that the path is correct and there are no types on the dbnames.
An example of the format of the file content would be as follows, with each line listing a different database.
mydatabasename1
mydatabasename2
mydatabasename3
mydatabasename4
The DBnames.txt file can be placed under a new folder FMS_HOME directory. You have to create two new paths -2. For Warning (FGLHOME / any path / warning)
Please make a note of the path. When opening the critical and warning condition a line should be visible to provide the path of the DBnames.txt. The path can be pasted there.
© ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center