-
Notifications
You must be signed in to change notification settings - Fork 4
Configuration
Vasily Korytov edited this page Mar 28, 2017
·
37 revisions
- 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 ]
-
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 withsh
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 againststdout
andstderr
-
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 betweentries
, since 2.1 -
repeat
: seconds between checks; defaults to30
This is the time between last check finished and the new one to start
Prior to 1.3 the default was60
-
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