Ad Widget

Collapse

How to identify the cause of incorrect data in calculated item?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BlackCrystal
    Junior Member
    • Dec 2018
    • 28

    #1

    How to identify the cause of incorrect data in calculated item?

    I have 2 items in zabbix version 5. first item as a trapper and it will be updated every one minute and Its value is ascending.
    second item is calculated based on first item and its formula is : (abschange("KeyName"))/60

    for example:
    if values of first item are these: 5,8,16,34,68,71,93,102,...
    then second item must return: 3,8,18,34,.. Then divide them by 60.

    what i get is completely different. i checked in latest data and the first item is always correct and ascending but the second item seems that can't calculate absolute value.
    how can i find the cause of this problem?

    here is an example of what i get:
    first item value: 148822441 ,148963574 ,149106618 ,149555694 ,...
    second item value: 63498138, 2384, 63498138, 2384,...

    i should mention that i had these exact items on zabbix 3 and they worked correctly. after migrating to zabbix 5 i face this problem.
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    try use depended item, not calculated.
    with preprocessing Arithmetic \ Custom multiplier 0,016667 or JS

    Comment


    • BlackCrystal
      BlackCrystal commented
      Editing a comment
      would you please provide an example of how to turn this "(abschange("KeyName"))/60" into preprocessing step?
  • Semiadmin
    Senior Member
    • Oct 2014
    • 1625

    #3
    Just create a dependent item with "change per second" in preprocessing

    Comment


    • Semiadmin
      Semiadmin commented
      Editing a comment
      You didn't write the exact version. In 5.4 functions and sintaxis very different from previous versions.

    • BlackCrystal
      BlackCrystal commented
      Editing a comment
      exact version is: 5.0.14

    • Semiadmin
      Semiadmin commented
      Editing a comment
      Very strange, I don't know any difference in calculated items between 3.* and 5.0.
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #4
    Read how preprocessing works here https://www.zabbix.com/documentation.../preprocessing.
    The dependent item gets the value of the parent item and converts it by preprocessing.

    Comment


    • BlackCrystal
      BlackCrystal commented
      Editing a comment
      Thank you for your help. i could finally create the item that i wanted.
Working...