Re: Service monitoring

pb <[email protected]>
Newsgroups gmane.linux.redhat.piranha
Message-ID <[email protected]>
Your welcome.  BTW when you put it into your
"Monitoring Scripts" section of your Piranha GUI, you
do it like this:

 Sending Program:  /etc/sysconfig/ha/test_ssh.sh %h

          Expect:  OK

...or into lvs.cf directly is then

 send_program = "/etc/sysconfig/ha/test_smtp.sh %h"

ALso if you come up with a way to prevent this script
from always writing this error to the maillog, please
let me know what you did. I'm assuming if you can add
to the telnet script command line harmlessly issuing
one of the commands in the log entry
(mail/expn/etc...) then this error could be stopped?

~~~
Mar 9 06:46:28 emailsever sendmail[3333]: NOQUEUE:
[1.2.3.4] did not issue MAIL/EXPN/VRFY/ETRN during
connection to MTA.
~~~

Thanks
Peter

--- ong cheechye <[email protected]> wrote:
> 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
> 
> 
> 
> _______________________________________________
> Piranha-list mailing list
> [email protected]
> https://listman.redhat.com/mailman/listinfo/piranha-list

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.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.