Case: How to monitor back-end Webservice response times as a consumer with curl on WebLogic?
Solution: If you have a very critical webservice for your application and it's response time affects your WebLogic runtime performance directly; here is a recipe to monitor every detail of monitoring relevant webservice with curl on WLSDM console.

Main shell script to monitor all response times: curlSoapWS.sh

curl -o /Users/admineer/u01/scripts.imac/curl.ws/response.xml -H "Content-Type: text/xml; charset=utf-8" \
     -H "SOAPAction:http://www.webserviceX.NET/GetCitiesByCountry"    \
     -d@/Users/admineer/u01/scripts.imac/curl.ws/soap-request.xml    \
     http://www.webservicex.net/globalweather.asmx    \
     -w "@/Users/admineer/u01/scripts.imac/curl.ws/curl-format.txt" -o /dev/null

soap-request.xml :

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetCitiesByCountry xmlns="http://www.webserviceX.NET">
      <CountryName>Turkey</CountryName>
    </GetCitiesByCountry>
  </soap:Body>
</soap:Envelope>

curl-format.txt :

Fevzis-iMac:curl.ws admineer$ more curl-format.txt 
time_namelookup=%{time_namelookup}\n
time_connect=%{time_connect}\n
time_appconnect=%{time_appconnect}\n
time_pretransfer=%{time_pretransfer}\n
time_redirect=%{time_redirect}\n
time_starttransfer=%{time_starttransfer}\n
response_time_total=%{time_total}\n


Generic DevOps MBean Definition on WLSDM Console:

image.png


Output on WLSDM Smart Dashboard:

image.png


Alarm/Notification Email:

image.png


Requests Over Threshold:

image.png



DownLoad DevOps Script:

WeatherWebserviceMonitoring_response_time_total.config.zip

Install it on Generic DevOps MBean page. Use import button on modal window.