Examples
The
following section describes some interesting examples of the SLCheck
utility. SLCheck
can be used in local area networks and on the Internet, only the
TCP/IP protocol is necessary. Please ensure that your firewall
allows the connection.
Monitor
a HTTP server while directly connected to the internet (without
proxy server):
SLCheck
-p 80 -a www.t-online.de -u / -r "HTTP/1.1 200 OK"
Port
80 of server www.t-online.de (without
any subdirectory) is requested. "HTTP/1.1 200 OK" is the
expected answer. If the server answers within 2 seconds (default)
with the expected answer, batch file c:\SLCheck\CheckOK.cmd
will be executed. If it doesn’t answer within 2 seconds, c:\SLCheck\CheckTimeout.cmd
will be run. c:\SLCheck\CheckMismatch.cmd
will be executed if the server answers with another string.
Option -u has "/" as the default value, so it would not
have been necessary to specify it in this example.
You
can also use this command to monitor your intranet server.
Monitor
an internet HTTP server from your LAN (via proxy server)
SLCheck
-p 80 -a 10.1.1.12 -u http://www.heise.de/ -r "HTTP/1.0 200
OK"
IP
address 10.1.1.12 is the address of your proxy server. That’s the
address of the server you have to configure in your browser. The
proxy server will be requested for the URL www.heise.de.
If it answers within the timeout of 2 seconds with „HTTP/1.0 200
OK“ then the file CheckOK.cmd
will be launched, otherwise the file CheckMismatch.cmd
or CheckTimeout.cmd.
Monitoring
an internet HTTP server from your LAN (via proxy server), second
example:
SLCheck
-p 80 -a www.microsoft.com -u http://www.microsoft.com/ms.htm -r
"HTTP/1.1 200 OK"
Server
www.microsoft.com answers to the
request „SLCheck -p 80 -a www.microsoft.com -u /“ with
„HTTP/1.1 404 Not Found“. In this case you can use option -u to
declare a special file to be loaded, in this example
„http://www.microsoft.com/ms.htm“. You could also request a .gif
file instead of a .htm file.
Monitoring
your internet connection (via proxy server). 2 URLs will be
monitored:
SLCheck
-p 80 -a 10.1.1.12 -u http://www.heise.de/ -r "HTTP/1.0 200
OK" -a2 10.1.1.12 -u2 http://www.microsoft.com/ -r2
"HTTP/1.0 200 OK"
The
two URLs http://www.heise.de and http://www.microsoft.com
are requested at proxy server 10.1.1.12. Each request expects
„HTTP/1.0 200 OK“ to return. If both requests fail (wrong return
string or timeout), batch file CheckFatal.cmd
will be executed additional to CheckMismatch.cmd
or CheckTimeout.cmd.
Monitoring
an internet SMTP server:
SLCheck
-p 25 -a smtp.web.de -r "220 smtp.web.de"
A
SMTP connection (Port 25) to server smtp.web.de will be established.
If the "220 smtp.web.de" will be returned, batch file
CheckOK.cmd is executed, otherwise CheckMismatch.cmd or
CheckTimeout.cmd.
Monitoring
an Exchange server on the local area network. A connection with the internet mail
service will be established.
SLCheck
-p 25 -a 10.1.1.14 -r "220 exchange.domain.com" -w 500
IP
address 10.1.1.14 is the address of the Exchange-Server. The timeout
was set to 500 milliseconds (default: 2000ms)
Monitoring
a FTP server:
SLCheck
-p 21 -a ftp.ca.com -r "220 ftp.ca.com NcFTPd Server (licensed
copy) ready." -w 5000
A
connection on port 21 (FTP) is established with server ftp.ca.com.
The expected return string is "220 ftp.ca.com NcFTPd Server
(licensed copy) ready.". If the server does not answer
correctly within 5 seconds, one of the batch files CheckMismatch.cmd
and CheckTimeout.cmd will
be executed.
Monitoring
a Telnet server:
SLCheck
-p 23 -a 10.1.0.1 -r "˙ý"
The
address of the Telnet server ist 10.1.0.1. You can find detailed
information in section Answer Strings.
Monitoring
a POP3 server:
SLCheck
-p 110 -a pop3.t-online.de -r "+OK T-Online POP3 Server fpopd
ready." -nookbatch
A
connection with server pop3.t-online.de is established on port 110
(POP3). If the server returns "+OK T-Online POP3 Server fpopd
ready.", nothing will be done because of the option -nookbatch.
If the server does not answer within the default timeout (2
seconds), batch file CheckTimeout.cmd
will be launched. If the server returns a different text, CheckMismatch.cmd
will be executed.
Monitor a Citrix
server (do not run in DOS box!):
SLCheck
-p 1494 -a citrix01 -r "ICA"
This
command sends a request to the ICA (Independent Computing
Architecture) port of a Citrix Metaframe server (Presentation
server) named citrix01. ICA protocol is the most important protocol
in Citrix environments. You can't execute this command in a DOS box
because the special characters before ICA produce backspaces. You
can copy & paste the command from this website and put it in a
batch file or place it directly in the scheduled tasks command line
- first of all, create a scheduled task with SLCheck.exe in the
command line and then modify the task.
Monitoring
an IMAP4 server:
SLCheck
-p 143 -a imap4.aol.com
An
IMAP4 connection with server imap.web.de is established. Option -r
was not used, so SLCheck shows a popup window with the answer
string.
To use SLCheck
for monitoring please use
SLCheck
-p 143 -a imap4.aol.com -r "* OK"
|