KBI 310234 TCP Service Handshake Scripts
Version
All
Date
1 Dec 2010
Summary
This article summarizes how TCP Service Handshake Scripts work when simulating user input on a port in the “System Down and SLA Rules”.
Technical Background
TCP Service Handshake Scripts is a feature in the System Down and SLA Rules when you choose “Scan Specific TCP/IP Port Number”.
While scanning a port checks if the port is listening, some customers may wish to take it a step further and make sure the listening port is still able to receive and process commands.
This feature is accessed by clicking on the “Advanced” button next to the port number.
Here is an example using SMTP on port 25:
For each line of output, you must specify an EXPECT statement.
Wildcards are supported (*)
After specifying the EXPECT for the “message of the day” from the SMTP server, you simulate user input using the SEND statement.
The series of commands above basically boil down to:
EXPECT 220* SEND ehlo argent.com EXPECT 250* EXPECT 250* EXPECT 250* EXPECT 250* EXPECT 250* EXPECT 250* EXPECT 250* EXPECT 250* EXPECT 250* EXPECT 250* SEND quit EXPECT 221*
We use wildcards to save work, and to cater for dynamic messages (e.g. messages that contain timestamps).
The status codes are generally the important points to “expect” for (220, 250, 221, etc.)
In the TCP Service Handshake Scripts, it would look like this:
Resolution
N/A