Ad Widget

Collapse

Zabbix Threshold

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ariya
    Junior Member
    • Sep 2025
    • 2

    #1

    Zabbix Threshold

    Hi,

    Currently we have this below expression to monitor mySQL Slave lag and sending us alerts if the lag is 10 minutes behind master.

    last(Template DB Percona MySQL Server/MySQL.slave.lag)>600


    Everything is working as expected. However, we want to update the expression to fire a trigger if the lag is behind the master for 10 minutes and lasting for 30 minutes. In other words, we don't the trigger to fire right away as soon as the lag is greater than 10 minutes.

    Could anyone provide suggestion and recommendation if any better function should we use?

    Thanks,
    Ariya
  • troffasky
    Senior Member
    • Jul 2008
    • 567

    #2
    Change 600 to 1800, I think that's what you're asking?
    If you are happy with the ">600" bit but want no notifications until it's been true for 1800s then look at trigger escalation.

    Comment

    • ISiroshtan
      Senior Member
      • Nov 2019
      • 324

      #3
      I think setting it to 1800 is a bit different then >600 for 10 minutes... as lag can be fluctuating and have non-linear build up speed, it can take 20-40-80 (or any other amount of time) to reach from 600 to 1800...
      I think what you want to use is is "min(Template DB Percona MySQL Server/MySQL.slave.lag, 30m) > 600". This way for trigger to fire the lowest value over last 30 minutes needs to be >600. meaning for last 30 minutes lag was >10 min. Do be mindful, if lag balances on edge of 10m going above and below threshold such alert will not fire.

      Comment

      • Ariya
        Junior Member
        • Sep 2025
        • 2

        #4
        Hi
        I think this is what I am looking for below:
        "min(Template DB Percona MySQL Server/MySQL.slave.lag, 30m) > 600"

        I will test out the above expression and hopefully it works. If not, I will post a new question. This is very helpful.

        Thanks,
        Ariya

        Comment

        Working...