Ad Widget

Collapse

Can someone explain me the "diff/last" trigger please ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jusavard
    Member
    • Sep 2013
    • 48

    #1

    Can someone explain me the "diff/last" trigger please ?

    Hi,
    My question might seem silly but I one of my collegue shows me that there seems to be a difference between the zabbix man of using the "siff trigger" and the actual way of using it.
    In the man :
    diff
    Checking if last and previous values differ. Supported value types: float, int, str, text, log

    Returns:
    1 - last and previous values differ
    0 - otherwise
    However when we use it :
    I can explain the ">0" saying that the trigger compare the last and previous value of the Item and if it' something different than 0 the item is flaged as "PROBLEM" but I can't explain the "(0)" .

    Why do we need to specify it ?
    Shouldn't we use it as "{Template OS Windows:agent.hostname.diff}>0" ?
    Is it because the function really need an inut value even if it's kinda dropped in this case ?
  • tcilmo
    Senior Member
    • Nov 2016
    • 122

    #2
    You don't need specify the "0" - the function can be : ".diff()}>0

    Comment

    • jusavard
      Member
      • Sep 2013
      • 48

      #3
      Does it means whatever the value I put there it will be ignored because the function does not really need one ?

      Comment

    • jusavard
      Member
      • Sep 2013
      • 48

      #4
      Exactly ! According to the man the function is not designed to take a parameter, however, as of Zabbix 3.0.5, the trigger difined for the agent.version and agent.hostname in the "Template OS Windows", "Template OS Linux", "Template OS [Whatever]" does have one. Go see by yourself in your installation in Configuration/Template.
      That's pretty wierd to see ZAbbix comes with default Template with default trigger using a function with "0" as input where this function does not need any. Anyway, I guess the "diff" function simply ignore the 0 sent as input.
      Attached Files

      Comment

      Working...