Blocking Rule that Fires Alarm if Number of Blocks Greater then 15. - Foglight for Databases - Foglight for Databases - Dell Community

Blocking Rule that Fires Alarm if Number of Blocks Greater then 15.

Blocking Rule that Fires Alarm if Number of Blocks Greater then 15.

This question is not answered

Hi all,

I am trying to create a rule that fires an alarm it one SPID blocks more then 15 SPIDS for more then 45 seconds. This is for SQL Server. What I have tried so far has not worked. Below is what I have attempted to use.

condition = (#blocked_time from $scope.blocked_history_summary# >= registry("DBSS_Blocking_Duration_Warning")) && (#blocked_time from $scope.blocked_history_summary# >= registry("DBSS_Blocking_Cnt_Warning")
);
return Dbwc_Common_SQL_Server_IsNeedToSendAlarm(scope,"DBSS - Blocking","2",condition);

The scope I am using is DBSS_Blocked_History_Data.

Has anyone done this before or have suggestions on how to to it?  Also we are also currently upgrading to SQL Server Cartridge 5.7.5.1 and are replacing SQL PA with SQL PI.  Will this upgrade change the topology objects that need to be used for this?

Verified Answer
  • I think I got it working below is the code.

    condition = (#blocked_time from $scope.blocked_history_summary# >= registry("DBSS_Blocking_Duration_Warning")) && (#blocked from $scope.blocked_history_summary# >= registry("DBSS_Blocking_Cnt_Warning")
    );

    return condition

All Replies
  • I think I got it working below is the code.

    condition = (#blocked_time from $scope.blocked_history_summary# >= registry("DBSS_Blocking_Duration_Warning")) && (#blocked from $scope.blocked_history_summary# >= registry("DBSS_Blocking_Cnt_Warning")
    );

    return condition