LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Graphing connections with RRDTool

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Graphing connections with RRDTool
From: Horms <horms@xxxxxxxxxxxx>
Date: Tue, 18 Nov 2003 17:22:44 +0900
On Tue, Nov 18, 2003 at 02:18:49AM -0500, Salvatore D. Tepedino wrote:
> I recently set up my *think* 4th or 5th LVS cluster, and decided to work
> in my latest obsession, RRDTool, into the mix. The result is a couple
> Bash scripts that dynamically update the rrd files (one per real server)
> based on which ones are currently in the cluster, and also dynamically
> graph the data. 
> I've tested the scripts with from 1 to 6 real servers (by copying one of
> the rrd files I had several times) and it seems to work without
> problems, although the formatting of the data on the bottom gets a
> little messy after a the 4th or 5th server, although not too bad. 
> They should, theoretically at least, work with any number of servers,
> although the coloring will get less and less distinct between the
> servers the more you add (although that creates a very nice gradient
> effect after a while ;). I've only had a chance to test them with 2 real
> servers running only a http service, but it should work with any service
> that LVS supports.
> 
> One small problem, currently, is that the update script greps the output
> of ipvsadm for 'Route' (The type of cluster this is) as I can find no
> other unique string to grep for from the ipvsadm output. Anyone know of
> a way to get more parse-friendly output? Something that only listed the
> real servers and usual stuff that's on their lines would be ideal, but a
> way to eliminate the header would be fine as well, as I could just grep
> out the VIP.

You have two main options here.

1. Write something that quiries the kernel directly,
   libipvs should be able to help you here.

2. Add a(nother) option to ipvsadm.

Personally I would go for 1 as it is probably quicker.
Though you could try 2 and see if you can twist Wensong's arm
into including it in the release.

> If anyone's interested, I'll send you a copy or post them here.
> 
> To see what they can do, have a look here, but be nice, as these arn't
> my servers, I just work on them.
> http://laurel.webgemsinc.com

Very nice :-)

-- 
Horms
<Prev in Thread] Current Thread [Next in Thread>