I have been monitoring a bunch of services including secure IMAP and POP3. For that purpose I have written a generic TCP connectivity testing script that would also look for a pattern in the client output. I will attach both my tcp.monitor and ssl.monitor scripts and here are a few examples of usage.
SSH: monitor tcp.monitor -p 22 -s 'SSH-2.0-SSH.Monitor\n\r\n\r\n\r\n\r\n' -e '.*SSH.*' HTTP and HTTPS: monitor tcp.monitor -p 80 -s 'GET / HTTP/1.0\r\n\n' -e '^Server:.*' monitor ssl.monitor -p 443 -s 'GET / HTTP/1.0\r\n\n' -e '^Server:.*' IMAP and IMAPS: monitor tcp.monitor -p 143 monitor ssl.monitor -p 993 or if you want to be extra accurate monitor tcp.monitor -p 143 -s '1 LOGOUT\n' -e '.*OK IMAP4.*' monitor ssl.monitor -p 993 -s '1 LOGOUT\n' -e '.*OK IMAP4.*'
ssl.monitor
Description: Perl program
tcp.monitor
Description: Perl program
_______________________________________________ mon mailing list [EMAIL PROTECTED] http://linux.kernel.org/mailman/listinfo/mon
