HTTP Request

The purpose of the HTTP Request Monitor is to perform an HTTP request and analyze the response of the HTTP server to:

  • monitor the availability of a Web page,
  • extract useful information from a Web-based administration user interface,
  • extract data from a Web service,
  • extract data from a REST API.

HTTP Request

An HTTP Request must specify a URL, which must contain the hostname of the HTTP server. To query:

  • the HTTP server running on the Host to which the Template is applied, use the %{HOSTNAME} macro in the URL (e.g.: https://%{HOSTNAME}/api/v2/directory). The HTTP request is then performed from the PATROL Agent to the monitored Host.
  • an external Web server, specify the hostname in the URL (e.g.: http://www.didthanoskill.me/). The HTTP request is then performed from the PATROL Agent to the specified host. This host may not be related to the Host to which the Template is applied.

If the HTTP request requires authentication, you will have to specify the method to be used:

  • HTTP Basic. The specified credentials will be sent directly to the HTTP server. You should use this method over HTTPS only.

  • Challenge (Basic, Digest, or NTLM). A first request is made without any credentials, to which the server responds a 401 code with the type of supported authentications. Then a second request is made with the required information, including the username and password of the specified credentials.

  • Custom. This method allows using the %{USERNAME}, %{PASSWORD}, %{PASSWORD_BASE64}, %{PASSWORD_URL} and %{PASSWORD_JSON} macros anywhere in the URL, header or body of the HTTP request.

  • Access Token. You will then have to specify:

    • the HTTP Request Monitor of the Template from which the access token will be extracted.
    • the name of the variable that holds the access token in the response of the HTTP request performing the authentication (e.g.: access_token for OAuth 2.0).

Refer to the table below to know how to configure the HTTP request:

Property Description
URL HTTP method (GET, POST, PUT, DELETE, etc.) to be performed and URL (http or https) of the resource to be polled and monitored.
Authentication Authentication method to be used for the HTTP request. Depending on the method, you may have to provide additional information (credentials, HTTP Request Monitor, token variable name, etc.)
Timeout After Time in seconds after which the request will be stopped (Default: 30 seconds). If the request times out, the Status parameter of the Studio Web Request Monitor will be set to 2 (Failed) and an alarm will be triggered, or the Template's Collection Error Count will be increased by ‘1’.

HTTP Request Headers and Body

You can customize the HTTP request that will be sent with specific headers and a custom body. The Web interface will help you send variables as a form or a JSON document, but you are free to specify any type of header and body format.

If you chose a custom authentication with credentials, you can use the following macros:

  • %{USERNAME}: The username of the specified credentials
  • %{PASSWORD}: The password of the specified credentials, in clear.
  • %{PASSWORD_BASE64}: The password encoded in Base64 (typical for Authorization: Basic headers)
  • %{PASSWORD_URL}: The password URL-encoded (typical for an application/x-www-form-urlencoded encoded body)
  • %{PASSWORD_JSON}: The password as a JSON string (typical for an application/json body)

HTTP Status Codes

You can specify which HTTP status codes indicate that the request has been successfully completed. Type the codes separated by commas. Use a dash to denote a range of codes. By default, Monitoring Studio X considers all 2xx codes (200-208,226) as success codes.

Monitor Properties

Property Description
Display Name Name to identify the HTTP Request Monitor instance in TrueSight Operations Management.
Internal ID ID to be used to store the HTTP Request Monitor configuration in the PATROL Agent configuration. This Internal ID is automatically generated based on the Display Name provided but can be edited if needed.
Collect Schedule How often new data is collected. A new collect can be performed from once every second, to once in a day. By default, the collect schedule is set to 2 minutes.
Content of the Result Parameter You can also specify what information will appear in the Result parameter: the entire HTTP response (header and body), the HTTP response body, the text content extracted from the body of the Web page (all tags are removed), a conversion of the JSON document to a flat map. If successful, the response to the HTTP request is provided in the Result parameter and can be parsed with any of the Content Parsing Monitors.

Once you are done with the configuration, you can run the Dry Run feature to simulate the execution of this Monitor on a specific host and therefore verify that the output is conform to the expected result.

Parameters and Alerts

You can define where alerts are reported, the threshold alert values, and the alert severity levels for the Monitor:

  • Indicate if you want Monitoring Studio X to report Monitor Errors in The Monitor's Status Parameter or The Template's Collection Error Count Parameter (default).

  • Then, for each parameter, define up to three alarm ranges (Alarm #1, Alarm #2 and Out-of-range) each with a minimum and a maximum value:

    • Use the Alarm #1 and Alarm #2 options to define the range of parameter values that triggers warnings and alarms.
    • Use the Out-of-range border conditions to be informed when the collected values are outside the norm (less than or greater than the defined range limits).

Refer to the Configuring Alerts for details and to Studio HTTP Request for more information about the parameters available and the thresholds set by default.

No results.