Ad Widget

Collapse

Query on time_shift

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vigneshn
    Junior Member
    • Jan 2018
    • 17

    #1

    Query on time_shift

    I'm new to Zabbix. I'm trying to create a trigger and was wondering how time_shift works.

    For instance, if I use below expression - when will alert be triggered?
    {node1:vfs.fs.size[/,pfree].avg(15m,3m)}<2

    I used a different formula, but I can see alert is triggered as soon as the trigger is assigned to the node:
    {node1:vfs.fs.size[/,pfree].avg(15m)}<2

    Both above triggers immediately triggered the alert. What is the difference between the 2 expressions?

    Thanks.
  • kaspars.mednis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2017
    • 349

    #2
    Hi,

    time shift allows you to look into some past period:

    Code:
    {node1:vfs.fs.size[/,pfree].avg(15m)}<2
    is taking average value from -15 minutes from now till now

    Code:
    {node1:vfs.fs.size[/,pfree].avg(15m,3m)}<2
    is taking average value from -18 minutes from now till -3 minutes from now

    Both triggers fires immediately because you had problems with free space more than 18 minutes ago, which covers both periods.

    Comment

    • vigneshn
      Junior Member
      • Jan 2018
      • 17

      #3
      Originally posted by kaspars.mednis
      Hi,

      time shift allows you to look into some past period:

      Code:
      {node1:vfs.fs.size[/,pfree].avg(15m)}<2
      is taking average value from -15 minutes from now till now

      Code:
      {node1:vfs.fs.size[/,pfree].avg(15m,3m)}<2
      is taking average value from -18 minutes from now till -3 minutes from now

      Both triggers fires immediately because you had problems with free space more than 18 minutes ago, which covers both periods.
      Excellent, that addresses my query. Thank you.

      This brings me to another question. As I was testing it, the old data was not available and when the trigger was assigned, only 2 samples were available spread across 1 minute interval - alert was generated immediately even though only 2 samples were available. How does the trigger calculate average when there are NO values? I presume that no_value=zero. Am I right?

      Thanks.
      Last edited by vigneshn; 06-02-2018, 04:53. Reason: updated that alert was generated

      Comment

      Working...