Tutorial

Add URL Monitoring

SuperMap iManager supports to add URL monitoring, please follow the steps below:

  1. Log in SuperMap iManager, click URL Monitoring on the left navigation bar.
  2. Click Add URL Monitoring on the top left connor of the page.
  3. Fill in the following information:

    addURLMonitoringen

    • Name(Required): The name of URL monitoring.
    • URL(Required): The URL address, the format of URL should be protocol://hostname:port/path/;parameters?query#fragment. If you are going to monitor the protected service resources in GIS Cloud Suite, please carry token parameter at the end of URL, e.g. http://ip:port/test?token=abcd, Please refer GIS Cloud Suite > Security > Token to get token.
    • Status Code(Required): HTTP status code, please refer to https://www.restapitutorial.com/httpstatuscodes.html for more details.
    • Time Out(Required): The limit of response time, if the waiting time were exceed the limited time, it seems as time out.
    • Assertion: Assert whether the returned response is matching to the expection. Fill the option with regular expression. If you were filling in both status code and assertion, the system would judge status code first.

      For example, set the assertion "top":40.7445721689417,"left":115.84346678320391,"bottom":38.81091128809847 for URL http://iserver.com/iserver/services/map-small/rest/maps/BaseMap_R@small.json. The following returned response is matching the expection.

      {
       "viewBounds": {
           "top": 40.7445721689417,
           "left": 115.84346678320391,
           "bottom": 38.81091128809847,
           "leftBottom": {
               "x": 115.84346678320391,
               "y": 38.81091128809847
           },
           "right": 117.77712766404714,
           "rightTop": {
               "x": 117.77712766404714,
               "y": 40.7445721689417
           }
       },
       ...
    • Follow Redirects: Check the box to enable the function, if the URL redirected, monitor the redirected URL. If you do not follow redirects, when the URL redirected, monitor the original URL.

    Notes:
    In Cloud Native architecture, the service request will go through gateway, for the URL which is following redirects and does not have a ‘token’, the URL will be redirected to the gateway when unavailable, the status in URL monitoring is still displaying ‘consistent with expection’. For example, the URL of service instance http://192.168.11.122:31124/iserver/services/map-World/rest follows redirects, the excepted status code is 200, the URL would be redirected to the gateway if you deleted the service instance, and the status in URL monitoring would still displays ‘consistent with expection’.

    • Restart Service: Check the box to enable the function, select the service that associated with the URL.

      • Site: Select the site of the objective service.
      • Service: Select the objective service.
      • Fail Times(Required): Set the fail times, if the returned response were not matching to the expection for a several times, the service would restart.
  4. Click on OK to finish adding the URL Monitoring.