This is a public Media Gallery  publicRSS

Active Monitor

    URLMonitor 1.1 (added Soap 1.1 and 1.2 content-type...
    Active Monitor posted 12/08/09 by Robert Strandberg, last edited 12/29/09
    724 Views
    Name:
    URLMonitor 1.1 (added Soap 1.1 and 1.2 content-type support)
    Description:

    The URLMonitor 1.1 have the same functions as the URLMonitor 1.0 and with added support for Web-Services (SOAP).

    In URLMonitor 1.1 it is possibility to make HTTP POST with content-type for SOAP version 1.1 and 1.2.

    You configure if you want to use it as a Active monitor (or action),Performance monitor fetching a value or reporting responsetime.

    Sometimes the posted data in SOAP can be long and contain ", below a simple example how to handle that , please note that the example below are in our setup but with specific data erased.

    '////////////////////// Start the URL monitor configuration
    'One row with MonitorURL for every URL to monitor
    Dim strPostTemp
    strPostTemp = "<soapenv:Envelope xmlns:soapenv=" & chr(34) & "http://schemas.xmlsoap.org/soap/envelope/" & chr(34) & " xmlns:ns0=" & chr(34) & "http://xmlinbox.webservices.<YourDomain.com>" & chr(34) & " xmlns:xsd=" & chr(34) & "http://www.w3.org/2001/XMLSchema" & chr(34) & " xmlns:xsi=" & chr(34) & "http://www.w3.org/2001/XMLSchema-instance" & chr(34) & "><soapenv:Body><ns0:getMessage>< ---Posted data--></ns0:getMessage></soapenv:Body></soapenv:Envelope>"

    MonitorURL "http://" & Context.GetProperty("Address")  & ":8080/<YourURLPath>","http://xmlinbox.webservices.serviceinterface.<YourURLPath>","SOAP12","","",strPostTemp, "<getMessageResponse>","</getMessageResponse>",0

    '
    '////////////// End of URL monitor configuration - No changes below are needed

    Text from the URLMonitor 1.0

    We use this script to monitor avalability and responsetime of our web aplications.

    The most advanced example we have in production are that we simulate a user doing:(Using HTTPS)

    1.Accessing the first webpage (GET)
    2.Login to the application (POST)
    3.Search for a specific category (POST)
    4.Select a specific catagory (POST)
    5.Search for a specific PDF document (GET)
    6.Select a specific PDF document (POST) and extracts a dynamic link
    7.Download the PDF document (10MB) (GET) by using the dynamic link in step 6
    8.Logout from application (GET)
    Total of 8 MonitorURL function calls, every function call control the received webpage.

    Below the example above
    '////////////////////// Start the URL monitor configuration
    'One row with MonitorURL for every URL to monitor
    MonitorURL  "https://<YourDomain.com>/<YourPath1>","<Your Text Content1>","GET","","","","","",0
    MonitorURL  "https://<YourDomain.com>/<YourPath2>","<Your Text Content2>","POST","","","<Your Posted data1>","","",0
    MonitorURL  "https://<YourDomain.com>/<YourPath3>","<Your Text Content3>","POST","","","<Your Posted data2>","","",0
    MonitorURL  "https://<YourDomain.com>/<YourPath4>","<Your Text Content4>","POST","","","<Your Posted data3>","","",0
    MonitorURL  "https://<YourDomain.com>/<YourPath5>","<Your Text Content5>","GET","","","","","",0
    'Find dynamic document referens
    MonitorURL  "https://<YourDomain.com>/<YourPath6>","<Your Text Content6>","POST","","","<Your Posted data4>","<Your static startstring before dynamic content>","<Your static endstring after dynamic content>",0
    'Add dynamic document referens to URL
    MonitorURL  "https://<YourDomain.com>/<YourPath7>" & sstrFromHost,"<Your Text Content7>","GET","","","","","",0
    MonitorURL  "https://<YourDomain.com>/<YourPath8>","<Your Text Content8>","GET","","","","","",0
    '////////////// End of URL monitor configuration - No changes below are needed 

     

    Language:
    VB Script
    Code:
    Disclaimer:
    All scripts found on wugSpace are provided as-is with no warranty or guarantee. These scripts are not supported by Ipswitch Technical Support. If you have a problem with this script, please ask any questions in the comments.