On Sun, 30 Oct 2011, netz-haut - stephan seitz wrote:
Hi,
thanks for your very helpful answer. It took me a few days to get back to that issue, so sorry for that late responose.
I've added additional lines for outgoing, and it works as expected.
I'm absolutely fine with hardcoed interfaces, cause I need the aggregated view of particular interfaces.
Thanks again,
Stephan
Am Donnerstag, den 13.10.2011, 19:42 +0200 schrieb Henrik Størner:
On 13-10-2011 16:44, netz-haut - stephan seitz wrote:
is there any "usual" way, to monitor and graph the traffic of a bulk of network interfaces? The reason is, some of our hosts are connected to iSCSI storages via multipath over two or four independent interfaces. Since the traffic is balanced equally, every interface shows (more or less) the same amount of traffic. This leads to very useless rrdtool graphics as there is only one multicolored thick line visible. It would be really helpful to see a graph which shows the SUM of the particular interfaces.
This can be done by creating an RRD graph definition to do the summation for you.
In RRDtool, you first use one or more "DEF" lines to grab specific data items from one or more RRD files, and put them into some "variables". You can then either use these variables directly to make a line on the graph, or you can use them for calculating other variables via a "CDEF" line.
The default ifstat graph has these lines:
DEF:inbytes at RRDIDX@=@RRDFN@:bytesReceived:AVERAGE CDEF:in at RRDIDX@=inbytes at RRDIDX@,8,*(The @RRDIDX@ and @RRDFN@ are because this graph repeats over all the interfaces - Xymon replaces these with a number and the RRD filename).
What this does is to first define a variable "inbytes at RRDIDX@" which has the "bytesReceived" value from the RRD. The it computes another variable, "in at RRDIDX@" as 8*inbytes - to convert from bytes to bits. The notation here is Reverse Polish (RPN).
So if you have 4 RRD files, one for each interface, you can have RRDtool do the math for you like this:
[ifsum] TITLE Network Traffic YAXIS Bits/second DEF:inbytes0=ifstat.eth0.rrd:bytesReceived:AVERAGE DEF:inbytes1=ifstat.eth1.rrd:bytesReceived:AVERAGE DEF:inbytes2=ifstat.eth2.rrd:bytesReceived:AVERAGE DEF:inbytes3=ifstat.eth3.rrd:bytesReceived:AVERAGE CDEF:intotal=inbytes0,inbytes1,inbytes2,inbytes3,+,+,+ CDEF:inbits=intotal,8,* LINE:inbits#FF0000:Aggregate inbound
The "LINE" definition then uses the "inbits" value to draw a (red) line with this data.
Have a look at graphs.cfg, and I'm sure you can figure out to add a line for the outgoing data also.
Add "ifsum" to the GRAPHS setting in xymonserver.cfg, and the graph should show up on the "trends" page.
Regards, Henrik
PS: I haven't actually tested any of this, so feel free to provide corrections :-)
Hi !
I knew, this thread is very old, but i want this feature very much :)
.. unfortunately something is missing in my enviroment, because i couldn't see the ifsum-graph on the trend-page ... :-(
Can somebody give me an advice how i debug this missing graph ?
My xmon-server is running the 4.3.7-version ..
thanks & cheers,
Martin
Ok, correction ... I can't see the ifsum-graph on the default trend-page, but if i take on graph of the trend-page and change the service=ports to service=ifsum
from https://xymon.desy.de/xymon-cgi/showgraph.sh?host=oracle1&service=ports&grap... to https://xymon.desy.de/xymon-cgi/showgraph.sh?host=oracle1&service=ifsum&grap...
then i got the graph :-)
But how can i display this on the default trend-page ?
thanks martin