In this screen cast I am showing WebService Performance monitoring with CURL;
- WebService can be SOAP or REST
- Giving alarm threshold for the WebService total response times
- Triggering auto Java Flight Recorder (JFR) and auto thread dump when the WebService performance exceeds the threshold
- Sample HelloWaitWebService application available at my github account: https://github.com/admineer/HelloWaitWebServiceApp
- Scripts are available in here: https://github.com/admineer/monitorRemoteWebserviceWithCURL
- HelloWait scripts are added; soap-request-hwait.xml and curlSoapWS-hwait.sh
1. Deploy HelloWaitWebService application to your WebLogic domain (supports 11g and 12c)
Download and Deploy: https://github.com/admineer/HelloWaitWebServiceApp
2. Download these files to your machine
curl-format.txt
curlSoapWS-hwait.sh*
soap-request-hwait.xml
3. Check soap-request-hwait.xml request XML file. The input field waitSecond is the time that you want to webservice respond.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:wiz="http://wizard/"> <soap:Header/> <soap:Body> <wiz:sayHello> <!--Optional:--> <name>Fevzi Korkutata</name> <!--Optional:--> <waitSecond>0</waitSecond> </wiz:sayHello> </soap:Body> </soap:Envelope>
4. Check curlSoapWS-hwait.sh script or CURL command and edit according to your environment.
Highligted:
curl -o /Users/admineer/u01/scripts.imac/curl.ws/hwait/response.xml -H "Content-Type: application/soap+xml; charset=UTF-8" \ -d@/Users/admineer/u01/scripts.imac/curl.ws/hwait/soap-request.xml \ http://localhost:7003/HelloWaitService/HelloWaitWebService1Port \ -w "@/Users/admineer/u01/scripts.imac/curl.ws/hwait/curl-format.txt" -o /dev/null
Inline:
curl -o /Users/admineer/u01/scripts.imac/curl.ws/hwait/response.xml -H “Content-Type: application/soap+xml; charset=UTF-8” \ -d@/Users/admineer/u01/scripts.imac/curl.ws/hwait/soap-request.xml \ http://localhost:7003/HelloWaitService/HelloWaitWebService1Port \ -w “@/Users/admineer/u01/scripts.imac/curl.ws/hwait/curl-format.txt” -o /dev/null
5. Transform this script or command to Generic DevOps MBean to measure WebService performance and trigger auto Java Flight Recorder (JFR) and auto Java thread dump. Watch below YouTube video tutorial for do it by yourself.