Ad Widget

Collapse

sum of value to have total of bandwidth usage

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • simerix
    Junior Member
    • Mar 2007
    • 16

    #1

    sum of value to have total of bandwidth usage

    Hi,
    i need to calculate the sum about inoctets and outoctets of a single switch (2 distinugued keys)
    i tried with aggregate cheks, but i think it's good only for groups.
    any ideas?
  • James Wells
    Senior Member
    • Jun 2005
    • 664

    #2
    Greetings,

    At present, that is not doable. Due to the way Zabbix collects item data, it is not possible to add two item values, except in triggers. Yes, the aggregate item functions will work, but only for adding identical items from multiple hosts in a group.
    Unofficial Zabbix Developer

    Comment

    • glut0r
      Member
      • Mar 2007
      • 38

      #3
      Originally posted by James Wells
      Greetings,

      At present, that is not doable. Due to the way Zabbix collects item data, it is not possible to add two item values, except in triggers. Yes, the aggregate item functions will work, but only for adding identical items from multiple hosts in a group.
      There's quite a dirty hack to get things going. I've seen this here, at forum, but cannot recall the thread. UserParameter does the trick,

      Code:
      UserParameter=blah,echo 'select sum(lastvalue) from items where ( key_='<your key here>' and hostid='<your hostid ) or ( key_='another key' and hostid='<another hostid>');' | mysql | tail -1'
      Of course two items to add must be integer (either 64 or float), but it's obvious I guess.

      It's quite dirty I think, but it works. I use it myself to track aggregated internet traffic from two edge routers and several interfaces.

      Anyway it would be nice to have native item performing above in nice and clean way.

      Comment

      Working...