Rename the two example files - reed-alert - Lightweight agentless alerting system for server HTML git clone git://bitreich.org/reed-alert/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/reed-alert/ DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- DIR commit 250471fd6675e66acf0abdce8f658875fd3c9720 DIR parent 8c2bf8ce1fbb624bbb60654950a00742084b548a HTML Author: Solene Rapenne <solene@perso.pw> Date: Thu, 31 May 2018 17:24:14 +0200 Rename the two example files Diffstat: M README | 9 +++++++++ R example.lisp -> example-full.lisp | 0 R config.lisp.sample -> example-simp… | 0 M probes.lisp | 7 +++++++ 4 files changed, 16 insertions(+), 0 deletions(-) --- DIR diff --git a/README b/README @@ -315,6 +315,15 @@ Check if a file has a size less than a specified limit. Example : `(=> alert file-less-than :path "/var/log/nginx.log" :limit 60)` +curl-http-status +---------------- +Do a HTTP request and return an error if the return code isn't 200. Requires curl. + +> Set the url to request. + :url "STRING" + +> Set the time to wait before aborting. + :timeout INTEGER The configuration file ====================== DIR diff --git a/example.lisp b/example-full.lisp DIR diff --git a/config.lisp.sample b/example-simple.lisp DIR diff --git a/probes.lisp b/probes.lisp @@ -113,3 +113,10 @@ (if (> (getf params :limit) result) t (list nil result)))) + +(create-probe + curl-http-status + (command-return-code + (list "curl" "-f" + (format nil "-m~a" (getf params :timeout 5)) + (getf params :url))))