Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

simple automated test to check RTC server/web accessible?

RTC production server went down yesterday evening, but it wasn't discovered until this morning.  
I would like to implement a simple automated health check to run hourly and send an alert on failure.

Is anyone doing this?   Right now our system is super simple - users go directly to the web server.


0 votes


Accepted answer

Permanent link
here is a little script

set COOKIES=.\cookies.txt

set USER=user_name
set PASSWORD=user_password
set HOST=https://localhost:9743/ccm - server url


curl -k -c %cookies% "%host%/authenticated/identity"

curl -k -L -b %COOKIES% -c %COOKIES% -d j_username=%USER% -d j_password=%PASSWORD% "%host%/authenticated/j_security_check"

rem pick some other api to call. this resets the perf counters.. get a workitem..
curl -k -L -b %COOKIES% "%host%/service/com.ibm.team.repository.service.internal.counters.ICountersRestService/allCounters"

Virginia Brown selected this answer as the correct answer

2 votes


3 other answers

Permanent link
You could also use curl to retrieve the ccm/scr and jts/scr pages to ensure both apps are responding.  The other thing to note is hitting the login window is probably more expensive than just asking for a valid page that doesn't require authentication.  This test does not check to see if the database is up or if connection to LDAP is working but then again neither does testing to see if you get a login window.  Just an alternative suggestion.

1 vote

Comments

good point. we just need enough of a test to go say - oh oh better go look

Another one is ../jts/rootservices and .../ccm/rootservices. They don't require authentication either, and are about the same size as the scr requests.


Permanent link
I have a customer that uses the web login page as their test - they check for a response to their main login page.

They also use monitoring tools to check the app server and database servers are running.

regards

anthony

0 votes

Comments

thanks anthony. the followup Q - how have they coded up the web check so that it can be run from a cron?

Not quite sure. It was probably scripted in some way. I suspect you could use something like curl and a simple shell script to do this but have to tried this myself.


Permanent link
You could use a script like the one outline in this article: https://jazz.net/library/article/1017 and wrap it around a scheduler (cron or AT for windows)

0 votes

Comments

thanks for the pointer to the article. this looks like a good one for admins to have in their toolkit.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Aug 27 '12, 9:43 a.m.

Question was seen: 4,905 times

Last updated: Aug 31 '12, 3:30 p.m.

Confirmation Cancel Confirm