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.
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.
Accepted answer
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"
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"
3 other answers
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.
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
They also use monitoring tools to check the app server and database servers are running.
regards
anthony
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)