HTTP request

The probe performs HTTP-requests:

  • GET,

  • POST,

  • HEAD,

  • PUT,

  • PATCH,

  • DELETE.

Settings example

image
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).

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 often for Agents with obsolete Java 1.6/1.7 versions during https-requests.

There are two solutions:

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

  2. Download and install the latest version of the agent with Java 1.8 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