Ad Widget

Collapse

Comparing items with other items or previous values

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • crlf
    Junior Member
    • Mar 2013
    • 13

    #1

    Comparing items with other items or previous values

    Hi,

    I'm trying to implement a trigger when a value suddenly drops or rises (think free space or ambient temperature). I'm thinking about comparing the last value with a value from the previous day, but I don't know how to accomplish this.

    Theoretically, it should be "prev_free_space - current_free_space > some_value", but trigger expressions don't seem to support such a thing. Do they?

    Is there any other way to do this using some feature that I don't know about? I'm using Zabbix 2.0.5.

    Thanks.
  • eskytthe
    Senior Member
    Zabbix Certified Specialist
    • May 2011
    • 363

    #2
    You could e.g. use the avg function, with the time_shift parameter

    BR
    Erik

    Comment

    • crlf
      Junior Member
      • Mar 2013
      • 13

      #3
      But can I do "average_some_time_ago > current_value - some_threshold"?

      From the docs it doesn't seem to be possible to compare two items with each other in the same trigger...

      Comment

      • eskytthe
        Senior Member
        Zabbix Certified Specialist
        • May 2011
        • 363

        #4
        Yes as far as I know - Take a look at example 11 (and operators in the start of the page):

        Br
        Erik

        Comment

        • crlf
          Junior Member
          • Mar 2013
          • 13

          #5
          Thanks, that worked.

          I ended up with this rule:

          Code:
          {server:vfs.fs.size[E:,free].last(0,1d)}-{server:vfs.fs.size[E:,free].last(0)}>10G

          Comment

          • lustigerpinguin
            Junior Member
            • Jun 2013
            • 14

            #6
            Permanent warning

            Hi,

            I used a similar syntax for a trigger.
            (my test: {zabbix-test.dev.nsynd.com:vfs.fs.size[/boot,pfree].avg(1200,300)}-{zabbix-test.dev.nsynd.com:vfs.fs.size[/boot,pfree].avg(300)}>3)

            The problem: after a short time: the problem isn't available! What can I do for a permanent warning on the main page (Dashboard)?

            Thanks

            Regards
            lustigerpinguin

            Comment

            Working...