Ad Widget

Collapse

Calculating 'calculated items' in Zabbix 2.2 and 3.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sivy310
    Junior Member
    • Aug 2013
    • 15

    #1

    Calculating 'calculated items' in Zabbix 2.2 and 3.0

    Hi,

    I'm doing some tests of adopting Zabbix 3.0.

    One of test cases is using some script which:
    - generates some (valid) data,
    - saves to a file
    - the file is sent with zabbix_sender to two instances of Zabbix server - one is in 2.2 version, another in 3.0

    And now...

    1) data are sent to both Zabbix servers successfully (working names: Item1,Item2,Item3)
    2) there are two calculated items defined (Item4,Item5) which base on Item{1,2,3} values
    3) finally, there is one more calculated item (Item6) which is calculated based on items from point 2)

    All those items are configured exactly the same on both Servers.


    Values which are sent by zabbix_sender are the same.
    Calculated items from 2) are also the same - first calculation works the same on both versions.
    Calculated item from 3) is different. On 3.0 value for Item6 is a sum of values for Item4 and Item5 from current minute. On 2.2 - values for Item 6 is a sum of values for Item4 and Item5 from previous minute.

    Table with data described above with some details in attachment ( item_stats.png).


    As you can see, Item6 has sum of Item4 and Item5 values from current minute in 3.0, despite the fact that they were calculated 22 seconds later than in 2.2.
    Are there any changes in algorithms of calculating such items? Or maybe you can see any other reason of such difference in behaviour of Zabbix?


    W.
    Last edited by sivy310; 01-08-2017, 15:02.
  • sivy310
    Junior Member
    • Aug 2013
    • 15

    #2
    One important update to be more precisely:

    Definition of calculated items:
    Item4: 100 * ((abschange("Item1") + change("Item1")) / 2) / ((abschange("Item3") + change("Item3")) / 2)

    Item5: 100 * ((abschange("Item2") + change("Item2")) / 2) / ((abschange("Item3") + change("Item3")) / 2)

    Item6: last(Item4) + last(Item5)

    So it looks like "abschange/change" works similiar on both versions but "last" behaves differently.

    W

    Comment

    • glebs.ivanovskis
      Senior Member
      • Jul 2015
      • 237

      #3
      Behaviour of last() hasn't been changed. It seems like in 3.0 values simply get processed faster. Or maybe it's a random effect due to update interval and/or StartDBSyncers settings.

      Comment

      Working...