rename file-exists into check-file-exists - 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 46c03914d4314e24b09bbdb7bff153e54bb3e4b4
DIR parent 93bc94cbac2d22e174cc7d19fcb6e1469fbb6107
HTML Author: Solène Rapenne <solene@perso.pw>
Date: Wed, 28 Jun 2023 10:54:37 +0200
rename file-exists into check-file-exists
Diffstat:
M README | 10 +++++-----
M example-full.lisp | 4 ++--
M probes.lisp | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
---
DIR diff --git a/README b/README
@@ -195,7 +195,7 @@ As of this commit, reed-alert ships with the following probes:
(1) number-of-processes
(2) pid-running
(3) disk-usage
- (4) file-exists
+ (4) check-file-exists
(5) file-updated
(6) load-average-1
(7) load-average-5
@@ -239,14 +239,14 @@ Check if the disk-usage of a chosen partition does exceed a specific limit.
Example: `(=> alert disk-usage :path "/tmp" :limit 50)`
-file-exists
+check-file-exists
-----------
Check if a file exists.
> Set the path of the file to check.
:path "STRING"
-Example: `(=> alert file-exists :path "/var/postgresql/standby")`
+Example: `(=> alert check-file-exists :path "/var/postgresql/standby")`
file-updated
@@ -521,10 +521,10 @@ but one may want to do it in LISP, allowing to use full features of
the language and even some libraries to check values in a database for
example. I recommend to read the "probes.lisp" file, it's the best way
to learn how to write a new probe. But as an example, we will learn
-from the easiest probe included : file-exists
+from the easiest probe included : check-file-exists
(create-probe
- file-exists
+ check-file-exists
(let ((result (probe-file (getf params :path))))
(if result
t
DIR diff --git a/example-full.lisp b/example-full.lisp
@@ -13,8 +13,8 @@
(=> peroket disk-usage :path "/tmp" :limit 0) ;; failure
;; check if :path file exists
-(=> mail file-exists :path "/bsd.rd" :desc "OpenBSD kernel /bsd.rd")
-(=> empty file-exists :path "/non-existant-file" :try 3) ;; failure file not found
+(=> mail check-file-exists :path "/bsd.rd" :desc "OpenBSD kernel /bsd.rd")
+(=> empty check-file-exists :path "/non-existant-file" :try 3) ;; failure file not found
;; check if :path file exists and has been updated since :limit minutes
(=> empty file-updated :path "/var/log/messages" :limit 400)
DIR diff --git a/probes.lisp b/probes.lisp
@@ -1,5 +1,5 @@
(create-probe
- file-exists
+ check-file-exists
(let ((result (probe-file (getf params :path))))
(if result
t