Skip to content

Configuration

Vasily Korytov edited this page Mar 28, 2017 · 37 revisions

Example

- name:   Yandex
  web:    https://ya.ru
  match:  Найти # Regexp to match in response.
  tries:  3     # Optional attempts number.
  sleep:  5     # Seconds between tries.

- web:    http://192.168.6.1
  repeat: 10   # Seconds between checks.
  return: 401  # Should return HTTP 401.
  alert:  ./slack
  notify: me@localhost

- shell:  ping -c 1 192.168.6.1
  repeat: 2
  notify: me, sales@server
  alert:  /usr/local/libexec/sms

# This check fails if ping succeeds:
- shell:  ping -c 1 192.168.7.1; [ $? = 1 -o $? = 2 ]

Specification

  • name: human-readable description to show instead of the actual URL/command (optional)
  • shell: shell command
    Shell checks are considered successful or failed based on the return code (0 is success)
    This code is executed with sh from %PATH% on Windows and /bin/sh otherwise
  • web: URL for a Web check
  • return: HTTP response code to match for success; 200 by default
    Please note that HTTP redirects are followed: on redirect this is the code of the target page
  • match: a regexp to match in output
    Web checks match against the web page
    Shell checks match against stdout and stderr
  • tries: if the check fails, try it N times until success
    If that's not specified, we use one attempt per run
  • sleep: optional seconds to sleep between tries, since 2.1
  • repeat: seconds between checks; defaults to 30
    This is the time between last check finished and the new one to start
    Prior to 1.3 the default was 60
  • notify: email address(es) to send notifications
    If nothing specified, will not mail check's status (you can find it in logs)
  • alert: notification plug-in to use
    Use a shell script to stack multiple notification plugins together
Clone this wiki locally