[Xymon] monitoring aggregated network traffic

Scot Kreienkamp SKreien at la-z-boy.com
Thu Oct 13 19:52:10 CEST 2011


How would that work when there are varying numbers of interfaces?  I have 14 on one, and 10 on another, each interface in its own RRD being collected by MRTG.  If I put all 14 in, won't it break on the 10?

Scot Kreienkamp
skreien at la-z-boy.com


-----Original Message-----
From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf Of Henrik Størner
Sent: Thursday, October 13, 2011 1:42 PM
To: xymon at xymon.com
Subject: Re: [Xymon] monitoring aggregated network traffic

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 :-)
_______________________________________________
Xymon mailing list
Xymon at xymon.com
http://lists.xymon.com/mailman/listinfo/xymon



More information about the Xymon mailing list