Ad Widget

Collapse

How to do arithmetic in Zabbix ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • marozsas
    Junior Member
    • Apr 2006
    • 7

    #1

    How to do arithmetic in Zabbix ?

    Hi !

    I am trying to setup a bandwidth monitor.

    I successfuly setup a input data graph defined as net.if.in[eth0] and stored as Delta (speed per second) and a similar output data graph.
    Theses 2 works fine.

    Now I want to get the total bandwidth, sum of delta of in and out.

    The question is how to define a total bandwidth.

    I tried to define a item as net.if.in[eth0].change+net.if.out[eth0].change, no luck.

    Looks like the operators change, now, prev does not work. they are ignored. I'm right ?

    any hints ?
  • mary nancy
    Senior Member
    • Jul 2005
    • 125

    #2
    just try this

    ({{HOSTNAME}.net.if.in[eth0].change}+{{HOSTNAME}.net.if.out[eth0].change})

    Comment

    • marozsas
      Junior Member
      • Apr 2006
      • 7

      #3
      Originally posted by mary nancy
      just try this

      ({{HOSTNAME}.net.if.in[eth0].change}+{{HOSTNAME}.net.if.out[eth0].change})
      Thanks.

      Looks like the operator change does not work for net.if. I got the same results with and without .change. This hapens to you too ?
      Code:
      [root@lasthope ~]# zabbix_agentd -t net.if.in[eth0].change
      net.if.in[eth0]                               [u|1193170127]
      [root@lasthope ~]# zabbix_agentd -t net.if.in[eth0]
      net.if.in[eth0]                               [u|1193172426]
      Anyway, I submited a patch to zabbix_agentd creating a new type: net.if.total.
      With this type it is easy to create a total bandwidth graph.
      If anyone is interested, take a look at my post in Zabbix Patches.

      thank you nancy !
      Last edited by marozsas; 02-05-2006, 19:08.

      Comment

      Working...