Q: How can I automatically monitor LISTSERV to make sure it is functioning?
Answer by Liam Kelly Senior Consulting Analyst, L-Soft
For many L-Soft customers, LISTSERV is a key component of their IT infrastructure. As with any key component, it is important to monitor the LISTSERV service to make sure that it's responsive and operating normally. In this Tech Tip, we will look at how to verify that LISTSERV is available through email and the web, and how to make sure that the application itself is running and responding to commands.
TCP Ports
For a LISTSERV site using the web interface, there are three TCP ports that need to be monitored: port 25 (SMTP), port 80 (HTTP) and port 2306 (TCPGUI). Different third-party monitoring programs have different ways of testing these ports. Some simply open a socket to the port to make sure it responds. Others will test the service itself by grabbing the SMTP or HTTP banner issued by the server. If you don't already have a third-party monitoring program, it is a fairly simple matter to write your own script to open sockets on ports 25, 80 and 2306 to the LISTSERV server to verify connectivity and send a notification to your IT staff in case of failure.
Application Testing
If we want a more thorough monitoring system, we can also collect some information about the applications themselves over the socket we have created. It may be the case that the network socket opens, but the application itself fails to respond. To check that, we can query the application for some output. For example, we can connect to port 25 to make sure we get a greeting banner from the mail server:
-> telnet listserv.example.org 25
Trying 192.168.1.123...
Connected to listserv.example.org.
Escape character is '^]'.
220 LISTSERV.EXAMPLE.ORG ready.
quit
221 Closing connection.
Connection closed by foreign host.
Similarly, we can grab the main LISTSERV web page from the web server to make sure the web interface is responding:
-> telnet listserv.example.org 80
Trying 192.168.1.123...
Connected to listserv.example.org.
Escape character is '^]'.
GET /scripts/wa.exe HTTP/1.1
host: listserv.example.org
HTTP/1.1 302 Redirect
Content-Length: 170
Content-Type: text/html
Location: http://listserv.example.org/scripts/wa.exe?HOME
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Date: Fri, 22 May 2009 19:23:36 GMT
<head><title>Document Moved</title></head>
<body><h1>Object Moved</h1>This document may be found <a HREF="http://listserv.example.org/scripts/wa.exe?HOME">here</a></body>
telnet> quit
Connection closed.
If our mail and web servers are both responding, we still need to know if the LISTSERV application is responding. We can check that with a connection to port 2306 and a simple THANKS command:
-> telnet listserv.example.org 2306
Trying 192.168.1.123...
Connected to listserv.example.org.
Escape character is '^]'.
thanks
You're welcome!
quit
Connection closed by foreign host.
The You're Welcome response tells us that the LISTSERV application is up and responding to commands. If we want more than a simple You're Welcome, we can send a SHOW CTR command to get some application statistics instead:
-> telnet listserv.example.org 2306
Trying 192.168.1.123...
Connected to listserv.example.org.
Escape character is '^]'.
show ctr
200905 1 0 7338 3822241 1519 160049 697 16933 21723 16180 0 5542 77012 60849 3999227 0 2590117 55785 26639811 179313 67486 52885 23063 658248 460 433220 0 321784 1605 0 698557 3999227 2060408 1248 0 0 0 0 0 END XPOL 744 519 EOD
quit
Connection closed by foreign host.
The format of the SHOW CTR output is documented in section 10.7.2 of the LISTSERV Site Manager's Manual. It includes things like the number of messages posted, number of recipients, CPU usage and bandwidth utilization. Any of these numbers may be useful as part of your routine networked application monitoring.
References
LISTSERV Site Manager's Manual
|