Notification of CSS Keepalive Failure

Unanswered Question
Jan 30th, 2009
User Badges:

Anyone have a scripted keepalive handy to help with having a CSS 11503 monitor an ASPX page and then notify a server administrator if the page becomes unavailable? Here's my sample service config:

<br />

<br />service aspx-server

<br /> ip addr

<br /> keepalive type http

<br /> keepalive uri “/serverpage.aspx”

<br /> keepalive method head (default)

<br /> active

<br />

<br />I've previously used the global command “logging sendmail (recipient ip addr) (mail server ip addr) (level of notification to receive)”, but I'd like to have this notification be more surgical in its delivery to a user/group mailbox, not a destination ip address.

<br />

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
pwwiddicombe Mon, 03/16/2009 - 11:03
User Badges:
  • Bronze, 100 points or more

I have done this - although recently it has started to misbehave slightly. In sniffing, it looks like OCCASIONALLY the CSS "forgets" to send the request, and then sends directed E-mail messages indicating a service is down because it didn't see the reply (which it isn't...).

service val-srv1

ip address

keepalive frequency 255

keepalive retryperiod 255

keepalive type script valsrv1-kal "valsrv1 http://valsrv1/test/healthcheck.asp"



Filename : valsrv1-kal


if ${ARGS}[#] "NEQ" "2"

echo "Check parameters\n"

exit script 1


set HOSTNAME "${ARGS}[1]"

set PAGE2CALL "GET ${ARGS}[2]\n"


socket connect host ${HOSTNAME} port 80 tcp 5000

socket send ${SOCKET} "${PAGE2CALL}"

!socket receive ${SOCKET}

!socket inspect ${SOCKET}

socket waitfor ${SOCKET} "Sanity check returns 200" 5000

if ${STATUS} "NEQ" "0"

socket disconnect ${SOCKET}

socket connect host port 25 tcp 1500

socket send ${SOCKET} "HELO \n"

socket waitfor ${SOCKET} "250" 300

socket send ${SOCKET} "MAIL FROM: Whoever\n"

socket waitfor ${SOCKET} "250" 300

socket send ${SOCKET} "RCPT TO: [email protected]\n"

socket waitfor ${SOCKET} "250" 300

socket send ${SOCKET} "RCPT TO: [email protected]\n"

socket waitfor ${SOCKET} "250" 300

socket send ${SOCKET} "DATA \n"

socket waitfor ${SOCKET} "354" 300

socket send ${SOCKET} "To : [email protected]\n"

socket send ${SOCKET} "cc : eFudd\n"

socket send ${SOCKET} "Subject : Error - Server failure \n"

socket send ${SOCKET} "Server ${HOSTNAME} failed health check\n"

socket send ${SOCKET} "v1.1\n"

socket send ${SOCKET} ".\n"

socket waitfor ${SOCKET} "250" 1000

socket send ${SOCKET} "QUIT\n"

socket disconnect ${SOCKET}

exit script 1


socket disconnect ${SOCKET}

exit script 0


This Discussion