Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

KeepAlive script

Status
Not open for further replies.

madhuusa

IS-IT--Management
Oct 5, 2006
93
US
Gurus,

We are probing on putting a load balancer. We are wrapping our test instance wherein we have 2 front end (with 3 instances on each front ends) servers, admin server running on seperate machine, EFS is on a seperate machine as a directory (eventually will be moved to SAN) and a database that is mirrored.

We are planning to put a Cisco router as load balancer. Since we are a cisco shop, this will be the likely load balancer.

What should I do for keepalive scripting? Meaning will just having the homepage url or homepageurl?func=ll.index kind of thing be okay for keepalive script.

Wont having this simple thing be misleading because http 200 OK will be returned even though livelink has an issue, say database connection for a particular instance is a problem, it will return invalid username/password but still it is an http 200 OK.

Can i do this. If I have a parser that can parse this html(We are a .NET shop and as such it is a .net mandate here) via http.request and http.response .NET objects and then assume it returns a correct string for which we search then i give an okay to the load balancer?

If I were to parse via .NET object, then will the url I hit (say should also contain the username and password. If so what is the url? We run in single sign on via directory services.

Any input is hugely appreciated.

Madhu.
 
there is a discussion on KeepAlives in the KC ( and also some best practice white papers on load balancing ( which may be of assistance to you.

Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
 
Good suggestions by Greg,
Cisco load balancer script language is pretty alien to me.Actaully Big _IP has monitoring scripts they call it extended avilabailty scripts.If you look inside the script you can see they are doing standard ps -ef calls to find the queuing of threads and such like.You could fairly easily write a vbscript/.NET app that can look at server processes.If llisapi memory goes up or livelink.exe's gets queued up there is a good indication that something is wrong on this particular server.
Also you can get OpenText's monitoring agent that is a SNMP tool that can listen in on your liveluink servers that is even without a login.Do you think that could be worthwhile too.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
Greg - I could not get good info from the link.

One of suggestion is to use func=ll.index and this will require authentication which the load balancer will not be able to provide.

I tried adding the username and password in the link and it also does not work.

For now we have given as the keep alive script. This is very basic just to make sure atleast IIS web site (which has the livelink instance) is up and running.

I have couple of ideas.
1. In keepalive script, make a java/asp call using http.url=livelink url and parse the http.response and make sure everything is okay and then give OK to the loadbalancer.

2. Write a LAPI code to do something and return an OK to loadbalancer.

Are these valid ideas.

Madhu
 
Madhu,

There are Livelink modules available that have very specific URLs that you can call to get specific information.

For instance, we have a module called "Syntergy Keep Alive" that will allow you to make calls from your load balancer and what you get returned is either a "true" or "false". This will allow to see the three most commonly requested things about Livelink:
1) Is Livelink up and running?
2) Is the Database/Livelink connection still good?
3) Is the Search Engine still Running?

These allow you to make decisions or send notification based on the responses you receive.

Because these are 3 separate URLs you can run each one of them at different intervals to allow you to have the best configuration without creating a load on Livelink.

If you need more information or would like some help let us know. Our contact info is at
 
I am using ll.index monitoring without the need of login, as Greg suggested.

I'm checking the output for the text 'llindex.html', so it also detects when the livelink service is not running correctly.

In the cisco config, I have:
keepalive type script ap-kal-httpstring "10.22.12.85 /livelink/livelink.exe?func=
ll.index llindex.html"

Using the standard ap-kal-httpstring script:
Code:
!no echo
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
!--- Filename:  ap-kal-httpstring 
!--- Parameters:  WebsiteIP WebPage WebString [Port] 
!--- Requirements: WebNS4.x or higher 
! 
!--- Uses:
!--- Checks the Web page for the Web string. If the string is missing, 
!--- mark the service as down. Used with any sort of page, especially dynamic 
!--- ones that are generated via scripts, ColdFusion, and so on. 
! 
!--- Logic:
!--- The script connects to a Web server on port 80 by default. 
!--- It performs a GET on the specified page. 
!--- If the Web string is returned, the service stays up. 
!--- If anything fails, the service is marked down. 
! 
!--- Notes:
!--- The Web string is case-sensitive.
!--- Only the first 10Kb of the response is inspected. 
! 
! 
!--- Tested:  04/12/01-KGS 
! 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 


no set CONTINUE_ON_ERROR 
no set EXIT_MSG 

!--- Make sure the user has the proper number of arguments.
 
if ${ARGS}[#] "LT" "3" 
    echo "Usage: ap-kal-httpcheck \'WebSiteIP WebPage WebString [Port]\'" 
    exit script 1 
endbranch 


!--- Set variables corresponding to the args. 

set WebSite "${ARGS}[1]" 
set WebPage "${ARGS}[2]" 
set WebString "${ARGS}[3]" 
set WebPort "80" 
if ${ARGS}[#] "GT" "3" 
  set WebPort "${ARGS}[4]" 
endbranch 

echo "Requesting ${WebPage} from ${WebSite} on port ${WebPort}." 


!--- Connect to the remote server.

set EXIT_MSG "Connect:  Failed.  Could not connect to ${WebSite} on port ${WebPort}" 
set CONTINUE_ON_ERROR "1" 
socket connect host ${WebSite} port ${WebPort} tcp 
if ${STATUS} "NEQ" "0" 
  exit script 1 
endbranch 
no set CONTINUE_ON_ERROR 


!--- Request the desired Web page.

set EXIT_MSG "Send:  Failed.  Could not send to ${WebSite}:${WebPort}" 
socket send ${SOCKET} "GET ${WebPage} HTTP/1.0\n\nHost: ${WebSite}:${WebPort}\n" 


!--- Look for the Web string.

set EXIT_MSG "Waitfor:  Failed.  Did not find [${WebString}]" 
set CONTINUE_ON_ERROR "1" 
socket waitfor ${SOCKET} "${WebString}" case-sensitive 
if ${STATUS} "NEQ" "0" 
  exit script 1 
endbranch 
no set CONTINUE_ON_ERROR 
  


!--- Disconnect from the server.
 
no set EXIT_MSG 
socket disconnect ${SOCKET} graceful 
exit script 0
 
Thanks for all the info.

I will do this and let know the results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top