Ad Widget

Collapse

max() not working as expected

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • smitty
    Junior Member
    • Mar 2011
    • 13

    #1

    max() not working as expected

    I am monitoring blocking on Microsoft SQL Server via WMI. It is working, but we only want the trigger to fire if a process has been blocking for 5 minutes or more. Here is the trigger definition that I'm using:

    {Template_Microsoft_SQLServer_2005erf_counter["\SQLServer:General Statistics\Processes blocked"].max(180)}>0

    This works, but it seems to send an alert AFTER 5 minutes, not if process(es) were actually blocked FOR 5 minutes. So something gets blocked for 1 minute, then becomes unblocked, and then a few minutes later the trigger fires - very annoying.

    What am I doing wrong here..?
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    you didn't define what the item returns and what you want to alert on.
    wild guess - did you want min() instead ?
    Zabbix 3.0 Network Monitoring book

    Comment

    • smitty
      Junior Member
      • Mar 2011
      • 13

      #3
      Thanks Rich!

      The item returns the number of SQL queries that are currently being blocked by another process. "0" is normal, values of 1 or more indicate that one or more processes are being blocked.

      So min(180) will only fire if the condition (IE: > 0 blocked processes, in my case) has been true for a minimum of 180 seconds, right?

      Comment

      • richlv
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Oct 2005
        • 3112

        #4
        in "human parse-able", it would mean that for the last 3 minutes there has been at least one blocked query (using min(), that is)
        Zabbix 3.0 Network Monitoring book

        Comment

        Working...