{"id":21,"date":"2026-10-22T19:03:53","date_gmt":"2026-10-22T17:03:53","guid":{"rendered":"https:\/\/demo.leitvia.com\/docs\/docs\/checks\/"},"modified":"2026-10-22T19:03:53","modified_gmt":"2026-10-22T17:03:53","slug":"checks","status":"publish","type":"page","link":"https:\/\/demo.leitvia.com\/docs\/docs\/checks\/","title":{"rendered":"Checks"},"content":{"rendered":"<nav class=\"wp-block-leitvia-table-of-contents\" aria-labelledby=\"leitvia-toc-title\"><h2 id=\"leitvia-toc-title\" class=\"wp-block-leitvia-table-of-contents__title\">On this page<\/h2><ol><li><a href=\"#http\">HTTP<\/a><\/li><li><a href=\"#certificate\">Certificate<\/a><\/li><li><a href=\"#tcp-port\">TCP port<\/a><\/li><li><a href=\"#keyword\">Keyword<\/a><\/li><\/ol><\/nav>\n\n<p class=\"wp-block-paragraph\">Every check has a <code>name<\/code>, a <code>type<\/code> and the settings of that type. <code>every<\/code>, <code>timeout<\/code> and <code>retries<\/code> come from <code>defaults<\/code> unless the check sets them.<\/p>\n\n\n<h2 class=\"wp-block-heading\">HTTP<\/h2>\n\n\n<p class=\"wp-block-paragraph\">Calls a URL and checks status code and response time. Redirects are followed up to five times.<\/p>\n\n<div class=\"leitvia-code-copy\">\n<pre class=\"wp-block-code\"><code>- name: Shop checkout\n  type: http\n  url: https:\/\/shop.example.org\/checkout\n  method: HEAD\n  expect:\n    status: [200, 302]\n    within: 1500ms<\/code><\/pre>\n<div class=\"leitvia-code-copy__bar\"><span class=\"leitvia-code-copy__status\" role=\"status\" data-copied=\"Copied\" data-failed=\"Copy failed, select the code and copy it manually\"><\/span><button type=\"button\" class=\"leitvia-code-copy__button\" hidden>Copy code<\/button><\/div><\/div>\n\n<h2 class=\"wp-block-heading\">Certificate<\/h2>\n\n\n<p class=\"wp-block-paragraph\">Opens a TLS connection and reads the expiry date of the certificate. The check fails <code>warn_before<\/code> days before expiry.<\/p>\n\n<div class=\"leitvia-code-copy\">\n<pre class=\"wp-block-code\"><code>- name: Certificate www\n  type: certificate\n  host: www.example.org\n  warn_before: 21<\/code><\/pre>\n<div class=\"leitvia-code-copy__bar\"><span class=\"leitvia-code-copy__status\" role=\"status\" data-copied=\"Copied\" data-failed=\"Copy failed, select the code and copy it manually\"><\/span><button type=\"button\" class=\"leitvia-code-copy__button\" hidden>Copy code<\/button><\/div><\/div>\n\n<h2 class=\"wp-block-heading\">TCP port<\/h2>\n\n<div class=\"leitvia-code-copy\">\n<pre class=\"wp-block-code\"><code>- name: Database\n  type: tcp\n  host: db.internal.example.org\n  port: 5432\n  every: 30s<\/code><\/pre>\n<div class=\"leitvia-code-copy__bar\"><span class=\"leitvia-code-copy__status\" role=\"status\" data-copied=\"Copied\" data-failed=\"Copy failed, select the code and copy it manually\"><\/span><button type=\"button\" class=\"leitvia-code-copy__button\" hidden>Copy code<\/button><\/div><\/div>\n\n<h2 class=\"wp-block-heading\">Keyword<\/h2>\n\n\n<p class=\"wp-block-paragraph\">An HTTP check that also looks for a text in the response body, for pages that answer 200 even when they show an error.<\/p>\n\n<div class=\"leitvia-code-copy\">\n<pre class=\"wp-block-code\"><code>- name: Login page\n  type: http\n  url: https:\/\/app.example.org\/login\n  expect:\n    status: 200\n    contains: &quot;Sign in&quot;<\/code><\/pre>\n<div class=\"leitvia-code-copy__bar\"><span class=\"leitvia-code-copy__status\" role=\"status\" data-copied=\"Copied\" data-failed=\"Copy failed, select the code and copy it manually\"><\/span><button type=\"button\" class=\"leitvia-code-copy__button\" hidden>Copy code<\/button><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Reference for the check types: HTTP, certificate, TCP port and keyword, with an example for each.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":8,"menu_order":3,"comment_status":"closed","ping_status":"closed","template":"page-docs","meta":{"_leitvia_easy_language_of":0,"footnotes":""},"class_list":["post-21","page","type-page","status-publish","hentry"],"leitvia_pattern_status":null,"_links":{"self":[{"href":"https:\/\/demo.leitvia.com\/docs\/wp-json\/wp\/v2\/pages\/21","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/demo.leitvia.com\/docs\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/demo.leitvia.com\/docs\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/demo.leitvia.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/demo.leitvia.com\/docs\/wp-json\/wp\/v2\/comments?post=21"}],"version-history":[{"count":1,"href":"https:\/\/demo.leitvia.com\/docs\/wp-json\/wp\/v2\/pages\/21\/revisions"}],"predecessor-version":[{"id":34,"href":"https:\/\/demo.leitvia.com\/docs\/wp-json\/wp\/v2\/pages\/21\/revisions\/34"}],"up":[{"embeddable":true,"href":"https:\/\/demo.leitvia.com\/docs\/wp-json\/wp\/v2\/pages\/8"}],"wp:attachment":[{"href":"https:\/\/demo.leitvia.com\/docs\/wp-json\/wp\/v2\/media?parent=21"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}