Demo

Checks

Every check has a name, a type and the settings of that type. every, timeout and retries come from defaults unless the check sets them.

HTTP

Calls a URL and checks status code and response time. Redirects are followed up to five times.

- name: Shop checkout
  type: http
  url: https://shop.example.org/checkout
  method: HEAD
  expect:
    status: [200, 302]
    within: 1500ms

Certificate

Opens a TLS connection and reads the expiry date of the certificate. The check fails warn_before days before expiry.

- name: Certificate www
  type: certificate
  host: www.example.org
  warn_before: 21

TCP port

- name: Database
  type: tcp
  host: db.internal.example.org
  port: 5432
  every: 30s

Keyword

An HTTP check that also looks for a text in the response body, for pages that answer 200 even when they show an error.

- name: Login page
  type: http
  url: https://app.example.org/login
  expect:
    status: 200
    contains: "Sign in"