hit counter script

Mailhost Keepalive - Cisco 11503 - CSS Content Services Switch Administration Manual

Content services switch
Hide thumbs Also See for 11503 - CSS Content Services Switch:
Table of Contents

Advertisement

Script Keepalive Examples

Mailhost Keepalive

Cisco Content Services Switch Administration Guide
8-62
if ${ARGS}[#] "NEQ" "3"
echo "Usage: ap-kal-httptag \'Hostname WebPage HostTag\'"
exit script 1
endbranch
! Defines:
set HostName "${ARGS}[1]"
set WebPage "${ARGS}[2]"
set HostTag "${ARGS}[3]"
! Connect to the remote Host
set EXIT_MSG "Connection Failure"
socket connect host ${HostName} port 80 tcp
! Send the GET request for the web page
set EXIT_MSG "Send: Failed"
socket send ${SOCKET} "GET ${WebPage} HTTP/1.0\nHost: ${HostTag}\n\n"
! Wait for a good status code
set EXIT_MSG "Waitfor: Failed"
socket waitfor ${SOCKET} "200 OK"
no set EXIT_MSG
socket disconnect ${SOCKET}
exit script 0
!no echo
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Filename: ap-kal-mailhost
! Parameters: HostName UserName Password
!
! Description:
!
This script will check the status on a mailhost.
!
should be running a POP3 and SMTP service.
!
to keepalive both services, and if one goes down we will report
!
an error.
!
! Failure Upon:
!
1. Not establishing a connection with the host running an SMTP
service.
!
2. Not establishing a connection with the host running a POP3
service.
!
3. Failure to get a good status code after saying 'hello' to SMTP.
!
4. Failure to login using POP3.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Chapter 8
Using the CSS Scripting Language
The mailhost
We will attempt
OL-5647-02

Advertisement

Table of Contents
loading

This manual is also suitable for:

11500 series

Table of Contents