Ad Widget

Collapse

Calculation of values

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • crayons
    Junior Member
    • Oct 2006
    • 21

    #1

    Calculation of values

    I have an item with units set to "Trans" standing for transactions. When it stores a number like 397139 in latest data it says "388 KTrans", so it is treating it like a file and dividing it by 1024. Is there anyway to avoid this, so it would display 397 KTrans instead without messing with the actual values in the database?

    I mean I guess it could be rigged up in some way with a custom multiplier, but then that would mess up the graph and just be a mess. I mean I guess it works if I set the item as if it were "Text", but then I lose my pretty zabbix graph
  • crayons
    Junior Member
    • Oct 2006
    • 21

    #2
    Well I fixed my own problem, so I thought I would share incase anyone else ran into this issue. It appears the default thing to do if it does not recognize the units is to treat it as a file and divide by 1024. So I edited config.inc.php and made my own custom unit called "Trans".

    So edited line 248 in "config.inc.php" to say "if( ($units=="b") || ($units=="bps") || ($units=="Trans"))"

    Now I have a custom unit where Trans will only be divided by 1000 instead of treating it like it was a file. yay!

    Comment

    Working...