LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Graphing connections with RRDTool

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: Graphing connections with RRDTool
From: "Salvatore D. Tepedino" <sal@xxxxxxxxxxxx>
Date: Tue, 18 Nov 2003 02:18:49 -0500
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.

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

The php is just an easy way to get the web page to update the graphs as
needed. If you have another way to do this, or just cron the graphing
script, then PHP won't be necessary.

Any question/comments/suggestions, feel free to ask/comment/suggest.
(But before you do, I know that bash is not the most efficient way to do
this, but it worked for me ;)


-- 
Salvatore D. Tepedino

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