cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
419
Views
0
Helpful
1
Replies

Notification of CSS Keepalive Failure

sjones226
Level 1
Level 1

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 1.1.1.1

<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 Reply 1

pwwiddicombe
Level 4
Level 4

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 192.168.1.99

keepalive frequency 255

keepalive retryperiod 255

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

active

====================

Filename : valsrv1-kal

Paramters : HOSTNAME PAGE2CALL

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

echo "Check parameters\n"

exit script 1

endbranch

set HOSTNAME "${ARGS}[1]"

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

set CONTINUE_ON_ERROR "1"

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: bugs@disney.com\n"

socket waitfor ${SOCKET} "250" 300

socket send ${SOCKET} "RCPT TO: eFudd@disney.com\n"

socket waitfor ${SOCKET} "250" 300

socket send ${SOCKET} "DATA \n"

socket waitfor ${SOCKET} "354" 300

socket send ${SOCKET} "To : Bugs@disney.com\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

endbranch

socket disconnect ${SOCKET}

exit script 0