HTTP request

The probe performs HTTP-requests:

  • GET,

  • POST,

  • HEAD,

  • PUT,

  • PATCH,

  • DELETE.

Settings example

Field Description

Request type

Type of the http-request:

  • GET,

  • POST,

  • HEAD,

  • PUT,

  • PATCH,

  • DELETE.

URL

URL of the resource to check.

HTTP headers

Additional HTTP headers, sent with the request. For instance, Content-Type = application/json.

Request body

Optional data to send with POST, PUT and PATCH requests. For instance, {"login":"demo", "password":"demo"}.

Send response body

In case it is sufficient to check only HTTP Status Code or Response Time, HTML body text from the agent to the system server is able not to be sent; it saves network traffic.

Response format

If JSON or XML-formatted data is returned, it will be automatically parsed to a table.

Timeout

Maximum time to perform the check in milliseconds.

Period

How often to perform the check (60 seconds by default).

HTTP Auth

Authentication method. Supported methods – No (server doesn’t require authentication), Auto, Basic, Digest, NTLM and Negotiate.

HTTP username

Username or authentication token.

HTTP password

Password for authentication. Ignored if token authentication is used.

Proxy enabled

Use proxy server to send the request.

Proxy URL

URL of the proxy server used to send the request.

Proxy server must support Basic, Digest, NTLM, and Negotiate authentication methods.

Proxy Auth

Authentication on the proxy server. Supported methods – No (server doesn’t require authentication), Auto, Basic, Digest, NTLM and Negotiate.

Proxy username

Username or authentication token.

Proxy password

Password for authentication.

Allow untrusted SSL

Allow connection to the servers that use untrusted SSL certificates.

SSL supported protocols

Comma-separated list of supported TLS protocols. Agent will refuse connection to the server that uses any other protocol. By default all connections are allowed.

Result

After the check has been done result is displayed in the Data table:

image
image
Field Description

statusCode

HTTP status code.

statusText

Text interpretation of HTTP status code.

headers.Xxx

HTTP response headers.

body

Response body.

body.Yyy

Response body fields, in case of JSON or XML-formatted data have been returned.

responseTimeMs

Response time in milliseconds.

Command-line utility

This check is the counterpart of the terminal command curl:

$ curl -sD - -X GET https://saas.saymon.info/

HTTP/2 200
server: nginx/1.13.6
date: Wed, 06 Dec 2017 08:49:33 GMT
content-type: text/html; charset=utf-8
content-length: 669
last-modified: Thu, 30 Nov 2017 09:41:32 GMT
etag: "5a1fd24c-29d"
access-control-allow-origin: *
charset: UTF-8
accept-ranges: bytes

<!doctype html>
<html>
<head>
  <title>Loading...</title>
  <meta charset="utf-8">
  <link rel="shortcut icon" href="/images/favicon.ico?1512034892710" type="image/x-icon">
</head>
<body>
<link rel="stylesheet" href="css/saymon.css?1512034892710">
<link rel="stylesheet" href="saymon.local/css/saymon.local.css?1512034892710">
<style type="text/css" id="pointer-position"></style>
<div class="loader">
  <div class="bounce bounce-1"></div>
  <div class="bounce bounce-2"></div>
  <div class="bounce bounce-3"></div>
</div>
<div class="js-main-region main-region"></div>
  <script data-main="js/main" src="js/main-built.js?1512034892710"></script>
</body>
</html>
$ curl -sD - -X POST https://saas.saymon.info/node/api/users/session -H "Content-Type: application/json" -d '{"login":"demo", "password":"demo"}'

HTTP/2 200
server: nginx/1.13.6
date: Wed, 06 Dec 2017 08:49:56 GMT
content-type: application/json
content-length: 38
set-cookie: sid=72174edb-5c18-49f2-809f-cd685ea17638; Path=/
access-control-allow-origin: *

"72174edb-5c18-49f2-809f-cd685ea17638"

Known problems and errors

Sensor error! Prime size must be multiple of 64, and can only range from 512 to 1024 (inclusive)
Sensor error! unable to find valid certification path to requested target
Sensor error! Received fatal alert: handshake_failure

These problems are common for Agents with obsolete Java versions during https-requests.

There are two solutions:

  1. Update Java on the host, where the agent is installed.

  2. Download and install the latest version of the agent with the required Java version embedded.

Sensor error! Target host is not specified

Check the address specified in URL field – protocol prefix is required:

right – https://saymon.info

wrong – saymon.info