PDA

View Full Version : PATCH: net.if.total


marozsas
28-04-2006, 21:21
Hi !

I need to plot the total bandwidht for a gateway here.
Using only net.if.in/out I was unable to create a graph that shows the total bandwidth (delta(net.if.in+net.if.out)), so I create a new net.if.total.


Check the resulting graph: http://www.zabbix.com/forum/attachment.php?attachmentid=273&stc=1
The net.if.total is the yellow area. Blue is net.if.in and red is net.if.out.

http://www.zabbix.com/forum/attachment.php?attachmentid=272&stc=1

This is my first patch. Sorry any mistake !

krusty
30-04-2006, 12:34
That looks very well. Thank you.

edeus
01-05-2006, 03:04
Hopefully it will get included into the main distrib!

cameronsto
01-05-2006, 15:57
Could this not be implemented with the new 'aggregate' function?

-cameron

luxpops
03-05-2006, 08:04
very interesting!! how do you apply the patch to be able to use it??

marozsas
03-05-2006, 15:56
I'm sorry. I just realize the way I provide the modified files is not usefull at all.
I'm not a programmer, just a poor sysadmin guy :)

Reading about patching source code, I learned the right way to do this thing.
A new file is provided with this e-mail. This file is suited to apply the patch in an easy way.

The instructions follow:


$ tar -xzvf zabbix-1.1beta9.tar.gz
$ cd zabbix-1.1beta9/
$ unzip ../if.net.total.zip
$ patch -p0 < if.net.total.patch
$ ./configure --enable-server --enable-agent --with-mysql --with-net-snmp
$ make
$ src/zabbix_agent/zabbix_agentd -t net.if.total[eth0]
net.if.total[eth0] [u|739648382]
$


To do a similar graph in my first post, just select the event net.if.total and store as delta (per second).

Sorry for any inconvenience,

PS: This patch is good only for linux. I can't test for others systems. I hope someone can.