Re: Service monitoring

ong cheechye <[email protected]>
Newsgroups gmane.linux.redhat.piranha
Message-ID <[email protected]>
Thanks Peter.

The shell script you posted in LVS seems to answer my
question for monitoring whether the service is
running.
I'm not required to monitor the load as I only use
round robin.

#!/bin/sh

TEST=`printf "quit\n" | telnet $1 PORT 2>/dev/null
|grep -i "connected"|wc -l` > /dev/null 2>&1

if [ $TEST -eq 1 ]; then
        echo "OK"
else
        echo "FAIL"
fi

I can then configure lvs.cf as follow:

Send Program:   [/usr/local/bin/scriptname %h]
Result:         [OK]

I assume Piranha will interprete %h as the name of the
realservers. 
e.g 

server Real1 {
		address = 192.168.10.2
		active = 1
	}
server Real2 {
		address = 192.168.10.3
		active = 1
	}

%h will be Real1/Real2.



 --- pb <[email protected]> wrote: > --- ong
cheechye <[email protected]> wrote:
> > I'm running my own service in the realserver. What
> > is the recommended way to monitor the availability
> 
> > of my service...[snip]
> 
> 
> Hi,
> 
> If your real servers are Linux you can load snmp and
> rpc.rstatd and rpc.statd for load balancing. Your
> Linux LVS can use that to monitor load.  If your
> realservers are not Linux/UNIX, then your service
> monitoring scripts or ipvsadm (which is used if you
> do
> not use service monitoring) handle checking on a
> port
> basis, far as I know.
> 
> PB
> 
> 
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - forms, calculators, tips, more
> http://taxes.yahoo.com/
> 
> 
> 
> _______________________________________________
> Piranha-list mailing list
> [email protected]
>
https://listman.redhat.com/mailman/listinfo/piranha-list 

__________________________________________________
Do You Yahoo!?
Promote your business from just $5 a month!
http://sg.biztools.yahoo.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.