Monitoring Telnet service

Murphy, Greg (GE Consumer Finance) Greg.Murphy2 at ge.com
Wed Aug 18 14:46:10 UTC 2004


Hi

I have an LVS system set up publishing a telnet service from 2 real servers. It is working fine, but I'm having some trouble with the program I use as the monitoring send_program. Its a bit of a crude script and just checks for a successful telnet session creation:

	#!/bin/bash

	testval=`telnet ${1} <<EOTXT 2>/dev/null | grep "Connected to" | wc -l
	]
	EOTXT`

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

Now as this script just opens a session and then disconnects it at the logon prompt, and as you would expect it creates loads of entries in /var/log/messages, eg on the load balancer:
	Aug 18 15:44:03 loadbalancer nanny[19040]: The following exited abnormally:
	Aug 18 15:44:03 loadbalancer nanny[19040]: failed to read remote load
And on the real server:
	Aug 18 15:44:28 realserver1 telnetd[5243]: ttloop: peer died: EOF

Has anybody ever written an effective script for monitoring a telnet server via LVS? Any pointers would be gratefully appreciated.

Thanks

Greg Murphy





More information about the Piranha-list mailing list