SMOLNET PORTAL home about changes
iREADME has been reworked, thanks to lambda from fnord.one. He fixed typos and enhanced explanations. - reed-alert - Lightweight agentless alerting system for server	Err	bitreich.org	70
hgit clone git://bitreich.org/reed-alert/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/reed-alert/	URL:git://bitreich.org/reed-alert/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/reed-alert/	bitreich.org	70
1Log	/scm/reed-alert/log.gph	bitreich.org	70
1Files	/scm/reed-alert/files.gph	bitreich.org	70
1Refs	/scm/reed-alert/refs.gph	bitreich.org	70
1Tags	/scm/reed-alert/tag	bitreich.org	70
1README	/scm/reed-alert/file/README.gph	bitreich.org	70
1LICENSE	/scm/reed-alert/file/LICENSE.gph	bitreich.org	70
i---	Err	bitreich.org	70
1commit 6e9a23321508e2e923f570efadc7b0e30d644c41	/scm/reed-alert/commit/6e9a23321508e2e923f570efadc7b0e30d644c41.gph	bitreich.org	70
1parent fed9c9d46da253a5cd756d36ee7378b818b1559e	/scm/reed-alert/commit/fed9c9d46da253a5cd756d36ee7378b818b1559e.gph	bitreich.org	70
hAuthor: Solene Rapenne <solene.rapenne@cbconseil.com>	URL:mailto:solene.rapenne@cbconseil.com	bitreich.org	70
iDate:   Thu, 16 Nov 2017 10:13:43 +0100	Err	bitreich.org	70
i	Err	bitreich.org	70
iREADME has been reworked, thanks to lambda from fnord.one. He fixed typos and enhanced explanations.	Err	bitreich.org	70
i	Err	bitreich.org	70
iDiffstat:	Err	bitreich.org	70
i  M README                              |     221 +++++++++++++++++++++----------	Err	bitreich.org	70
i	Err	bitreich.org	70
i1 file changed, 152 insertions(+), 69 deletions(-)	Err	bitreich.org	70
i---	Err	bitreich.org	70
1diff --git a/README b/README	/scm/reed-alert/file/README.gph	bitreich.org	70
i@@ -1,37 +1,62 @@	Err	bitreich.org	70
i-Presentation	Err	bitreich.org	70
i+Description	Err	bitreich.org	70
i+===========	Err	bitreich.org	70
i+	Err	bitreich.org	70
i+reed-alert is a small and simple monitoring tool for your server,	Err	bitreich.org	70
i+written in Common LISP.	Err	bitreich.org	70
i+	Err	bitreich.org	70
i+reed-alert checks the status of various processes on a server and	Err	bitreich.org	70
i+triggers self defined notifications.	Err	bitreich.org	70
i+	Err	bitreich.org	70
i+Each triggered message is called an 'alert'.	Err	bitreich.org	70
i+Each check is called a 'probe'.	Err	bitreich.org	70
i+Each probe can be customized by different parameters.	Err	bitreich.org	70
i+	Err	bitreich.org	70
i+	Err	bitreich.org	70
i+Dependencies	Err	bitreich.org	70
i ============	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-reed-alert is a tool to check the status of various things on a server	Err	bitreich.org	70
i-and trigger user defined notifications to be alerted. In the code,	Err	bitreich.org	70
i-each check is called a "probe" and have parameters.	Err	bitreich.org	70
i+reed-alert is regularly tested on FreeBSD/OpenBSD/Linux and has been	Err	bitreich.org	70
i+tested with both **sbcl** and **ecl** - which should be available for	Err	bitreich.org	70
i+most distributions.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-The code is very rough for now. I will try to make the config file	Err	bitreich.org	70
i-easier than it is actually, but I think it's already easy enough for	Err	bitreich.org	70
i-people who need to kind of tool.	Err	bitreich.org	70
i+(On OpenBSD you may prefer to use ecl because sbcl needs 'wxallowed'	Err	bitreich.org	70
i+where the binary is.)	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-I try to avoid usage of external libraries so the deployment is easy	Err	bitreich.org	70
i-as it only requires a Common LISP interpreter and a few files.	Err	bitreich.org	70
i+To make reed-alert's deployment easier I avoid using external	Err	bitreich.org	70
i+libraries. reed-alert only requires a Common LISP interpreter and a	Err	bitreich.org	70
i+few files.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-reed-alert is regularly tested on FreeBSD/OpenBSD/Linux.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-How to use	Err	bitreich.org	70
i-==========	Err	bitreich.org	70
i+Code-Readability	Err	bitreich.org	70
i+================	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-It has been tested with both **sbcl** and **ecl** which should be	Err	bitreich.org	70
i-available in most distribution people use. On OpenBSD you may prefer	Err	bitreich.org	70
i-to use ecl because sbcl needs wxallowed where the binary is.	Err	bitreich.org	70
i+Although the code is very rough for now, I think it's already fairly	Err	bitreich.org	70
i+understandable by people who do need this kind of tool.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i+I will try to improve on the readability of the config file in future	Err	bitreich.org	70
i+commits.	Err	bitreich.org	70
i+	Err	bitreich.org	70
i+	Err	bitreich.org	70
i+Usage	Err	bitreich.org	70
i+=====	Err	bitreich.org	70
i+	Err	bitreich.org	70
i+Start reed-alert	Err	bitreich.org	70
i+----------------	Err	bitreich.org	70
i To start reed-alert	Err	bitreich.org	70
i 	Err	bitreich.org	70
i + sbcl : **sbcl --script config_file.lisp**	Err	bitreich.org	70
i + ecl  : **ecl -shell config_file.lisp**        	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-You can rename **config.lisp.sample** to **config.lisp** to create	Err	bitreich.org	70
i-your own configuration file. The configuration is explained below.	Err	bitreich.org	70
i+Personal Configuration File	Err	bitreich.org	70
i+---------------------------	Err	bitreich.org	70
i+You may want to rename **config.lisp.sample** to **config.lisp** in	Err	bitreich.org	70
i+order to create your own configuration file.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i+The configuration is explained below.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-Defining notification system	Err	bitreich.org	70
i-============================	Err	bitreich.org	70
i+	Err	bitreich.org	70
i+The Notification System	Err	bitreich.org	70
i+=======================	Err	bitreich.org	70
i 	Err	bitreich.org	70
i + function    : the name of the probe	Err	bitreich.org	70
i + date        : the current date with format YYYY/MM/DD hh:mm:ss	Err	bitreich.org	70
i@@ -45,131 +70,189 @@ Defining notification system	Err	bitreich.org	70
i + space       : a space character	Err	bitreich.org	70
i + newline     : a newline character	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-If you want to send a mail with a message like "At 2016/10/06 11:11:12	Err	bitreich.org	70
i-server.foo.com has encountered a problem during LOAD-AVERAGE-15	Err	bitreich.org	70
i-(:LIMIT 10) with a value of 30" you can write the following and use	Err	bitreich.org	70
i-**pretty-mail** in your checks.	Err	bitreich.org	70
i+	Err	bitreich.org	70
i+Example Probe: 'Check For Load Average'	Err	bitreich.org	70
i+---------------------------------------	Err	bitreich.org	70
i+If you want to send a mail with a message like:	Err	bitreich.org	70
i+	Err	bitreich.org	70
i+        "At 2016/10/06 11:11:12 server.foo.com has encountered a problem	Err	bitreich.org	70
i+        during LOAD-AVERAGE-15 (:LIMIT 10) with a value of 30"	Err	bitreich.org	70
i+	Err	bitreich.org	70
i+	Err	bitreich.org	70
i+write the following and use **pretty-mail** in your checks:	Err	bitreich.org	70
i 	Err	bitreich.org	70
i    (defvar *alerts*	Err	bitreich.org	70
i      (list	Err	bitreich.org	70
i       '(pretty-mail ("echo '" date _ hostname " has encountered a problem during" function 	Err	bitreich.org	70
i                          params " with a value of " result "' | mail yourmail@foo.bar"))))	Err	bitreich.org	70
i-                                         	Err	bitreich.org	70
i-If you don't want anything to be triggered, you can use the following	Err	bitreich.org	70
i-in *alerts*	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-    '(nothing-to-send nil)	Err	bitreich.org	70
i-        	Err	bitreich.org	70
i-If you find it easier to read, you can add + in the concatenation,	Err	bitreich.org	70
i-this is simply discarded when the program parse the list.	Err	bitreich.org	70
i+Variant 1	Err	bitreich.org	70
i+~~~~~~~~~	Err	bitreich.org	70
i+If you find it easier to read, you can add + in the concatenation.	Err	bitreich.org	70
i+The + is discarded by reed-alert as soon as it parses the list.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i     '(pretty-mail (date + " " + hostname + " has encountered a problem " + function))	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-The differents probes	Err	bitreich.org	70
i-=====================	Err	bitreich.org	70
i+Variant 2	Err	bitreich.org	70
i+~~~~~~~~~	Err	bitreich.org	70
i+If you don't want anything to be triggered use the following in *alerts*:	Err	bitreich.org	70
i+	Err	bitreich.org	70
i+    '(nothing-to-send nil)	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-Probes are written in LISP and sometimes relies on system call, like	Err	bitreich.org	70
i-for ping or the average load of the system. It cares about running on	Err	bitreich.org	70
i-different operating system.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-The following parameter is allowed for every probes. It allows you to	Err	bitreich.org	70
i-describe what the check do / concern to put it in the notification if you want	Err	bitreich.org	70
i+The Probes	Err	bitreich.org	70
i+==========	Err	bitreich.org	70
i+	Err	bitreich.org	70
i+Probes are written in Common LISP.	Err	bitreich.org	70
i+	Err	bitreich.org	70
i+The :desc Parameter	Err	bitreich.org	70
i+-------------------	Err	bitreich.org	70
i+The :desc parameter allows you to describe specifically what your check	Err	bitreich.org	70
i+does. It can be put in every probe.	Err	bitreich.org	70
i+	Err	bitreich.org	70
i     :desc "STRING"	Err	bitreich.org	70
i 	Err	bitreich.org	70
i+	Err	bitreich.org	70
i+Overview	Err	bitreich.org	70
i+--------	Err	bitreich.org	70
i+As of this commit, reed-alert ships with the following probes:	Err	bitreich.org	70
i+	Err	bitreich.org	70
i+        (1)         number-of-processes	Err	bitreich.org	70
i+        (2)         pid-running	Err	bitreich.org	70
i+        (3)         disk-usage	Err	bitreich.org	70
i+        (4)         file-exists	Err	bitreich.org	70
i+        (5)         file-updated	Err	bitreich.org	70
i+        (6)         load-average-1	Err	bitreich.org	70
i+        (7)         load-average-5	Err	bitreich.org	70
i+        (8)         load-average-15	Err	bitreich.org	70
i+        (9)        ping	Err	bitreich.org	70
i+        (10)        command	Err	bitreich.org	70
i+        (11)    service	Err	bitreich.org	70
i+        (12)    file-less-than	Err	bitreich.org	70
i+	Err	bitreich.org	70
i+	Err	bitreich.org	70
i number-of-processes	Err	bitreich.org	70
i -------------------	Err	bitreich.org	70
i-Check if the actual number of processes of the system exceed the limit	Err	bitreich.org	70
i+Check if the actual number of processes of the system exceeds a specific limit.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-> Set the limit that will trigger an alert when exceeded	Err	bitreich.org	70
i+> Set the limit that will trigger an alert when exceeded.	Err	bitreich.org	70
i     :limit INTEGER	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-Example : `(=> example number-of-processes (:limit 200))`	Err	bitreich.org	70
i+Example : `(=> alert number-of-processes (:limit 200))`	Err	bitreich.org	70
i+	Err	bitreich.org	70
i 	Err	bitreich.org	70
i pid-running	Err	bitreich.org	70
i -----------	Err	bitreich.org	70
i-Check if the PID number found in a .pid file is alive	Err	bitreich.org	70
i+Check if the PID number found in a .pid file is alive.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-> Set the path of the pid file. If user don't have permission to open it, return "file not found"	Err	bitreich.org	70
i+> Set the path of the pid file. If $USER doesn't have permission to open it, return "file not found".	Err	bitreich.org	70
i     :path "STRING"	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-Example : `(=> example pid-running (:path "/var/run/nginx.pid"))`	Err	bitreich.org	70
i+Example : `(=> alert pid-running (:path "/var/run/nginx.pid"))`	Err	bitreich.org	70
i 	Err	bitreich.org	70
i 	Err	bitreich.org	70
i disk-usage	Err	bitreich.org	70
i ----------	Err	bitreich.org	70
i-Check if the used percent of the choosed partition exceed the limit	Err	bitreich.org	70
i+Check if the disk-usage of a chosen partition does exceed a specific limit.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-> Set the mountpoint to check	Err	bitreich.org	70
i+> Set the mountpoint to check.	Err	bitreich.org	70
i     :path "STRING"	Err	bitreich.org	70
i         	Err	bitreich.org	70
i-> Set the limit that will trigger an alert when exceeded	Err	bitreich.org	70
i+> Set the limit that will trigger an alert when exceeded.	Err	bitreich.org	70
i     :limit INTEGER	Err	bitreich.org	70
i         	Err	bitreich.org	70
i-Example : `(=> example disk-usage (:path "/tmp" :limit 50))`	Err	bitreich.org	70
i+Example : `(=> alert disk-usage (:path "/tmp" :limit 50))`	Err	bitreich.org	70
i 	Err	bitreich.org	70
i 	Err	bitreich.org	70
i file-exists	Err	bitreich.org	70
i -----------	Err	bitreich.org	70
i-Check if a file exists	Err	bitreich.org	70
i+Check if a file exists.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-> Set the path of the file to check	Err	bitreich.org	70
i+> Set the path of the file to check.	Err	bitreich.org	70
i     :path "STRING"	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-Example : `(=> example file-exists (:path "/var/postgresql/standby"))`	Err	bitreich.org	70
i+Example : `(=> alert file-exists (:path "/var/postgresql/standby"))`	Err	bitreich.org	70
i+	Err	bitreich.org	70
i 	Err	bitreich.org	70
i file-updated	Err	bitreich.org	70
i ------------	Err	bitreich.org	70
i-Check if a file exists and has been updated since a defined time	Err	bitreich.org	70
i+Check if a file exists and has been updated since a defined time.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-> Set the path of the file to check	Err	bitreich.org	70
i+> Set the path of the file to check.	Err	bitreich.org	70
i     :path "STRING"	Err	bitreich.org	70
i         	Err	bitreich.org	70
i-> Set the limit in minutes since the last modification time before triggering an alert	Err	bitreich.org	70
i+> Set the limit in minutes since the last modification time before triggering an alert.	Err	bitreich.org	70
i     :limit INTEGER	Err	bitreich.org	70
i         	Err	bitreich.org	70
i-Example : `(=> example file-updated (:path "/var/log/nginx/access.log" :limit 60))`	Err	bitreich.org	70
i+Example : `(=> alert file-updated (:path "/var/log/nginx/access.log" :limit 60))`	Err	bitreich.org	70
i+	Err	bitreich.org	70
i 	Err	bitreich.org	70
i load-average-1	Err	bitreich.org	70
i --------------	Err	bitreich.org	70
i-Check if the load average on the last minute exceed the limit	Err	bitreich.org	70
i+Check if the load average during the last minute exceeds a specific limit.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-> Set the limit not to exceed	Err	bitreich.org	70
i+> Set the limit not to exceed.	Err	bitreich.org	70
i     :limit INTEGER	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-Example : `(=> example load-average-1 (:limit 2))`	Err	bitreich.org	70
i+Example : `(=> alert load-average-1 (:limit 2))`	Err	bitreich.org	70
i+	Err	bitreich.org	70
i 	Err	bitreich.org	70
i load-average-5	Err	bitreich.org	70
i --------------	Err	bitreich.org	70
i-Check if the load average on the last fives minutes exceed the limit	Err	bitreich.org	70
i+Check if the load average during the last five minutes exceeds a specific limit.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-> Set the limit not to exceed	Err	bitreich.org	70
i+> Set the limit not to exceed.	Err	bitreich.org	70
i     :limit INTEGER	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-Example : `(=> example load-average-5 (:limit 2))`	Err	bitreich.org	70
i+Example : `(=> alert load-average-5 (:limit 2))`	Err	bitreich.org	70
i+	Err	bitreich.org	70
i 	Err	bitreich.org	70
i load-average-15	Err	bitreich.org	70
i ---------------	Err	bitreich.org	70
i-Check if the load average on the last fifteen minutes exceed the limit	Err	bitreich.org	70
i+Check if the load average during the last fifteen minutes exceeds a specific limit.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-> Set the limit not to exceed	Err	bitreich.org	70
i+> Set the limit not to exceed.	Err	bitreich.org	70
i     :limit INTEGER	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-Example : `(=> example load-average-15 (:limit 2))`	Err	bitreich.org	70
i+Example : `(=> alert load-average-15 (:limit 2))`	Err	bitreich.org	70
i+	Err	bitreich.org	70
i 	Err	bitreich.org	70
i ping	Err	bitreich.org	70
i ----	Err	bitreich.org	70
i-Check if a remote host answer the 2 ICMP ping	Err	bitreich.org	70
i+Check if a remote host answers the 2 ICMP ping.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-> Set the host to ping. Return an error if ping command returns non-zero	Err	bitreich.org	70
i+> Set the host to ping. Return an error if ping command returns non-zero.	Err	bitreich.org	70
i     :host "STRING" (can be IP or hostname)	Err	bitreich.org	70
i         	Err	bitreich.org	70
i-Example : `(=> example ping (:host "8.8.8.8"))`	Err	bitreich.org	70
i+Example : `(=> alert ping (:host "8.8.8.8"))`	Err	bitreich.org	70
i+	Err	bitreich.org	70
i 	Err	bitreich.org	70
i command	Err	bitreich.org	70
i -------	Err	bitreich.org	70
i-Execute an arbitrary command which trigger an alert if the command return a non-zero value	Err	bitreich.org	70
i+Execute an arbitrary command which triggers an alert if it returns a non-zero value.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-> Command to execute, accept commands with pipes	Err	bitreich.org	70
i+> Command to execute, accept commands with pipes.	Err	bitreich.org	70
i     :command "STRING"	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-Example : `(=> example command (:command "tail -n 10 /var/log/messages | grep -v CRITICAL"))`	Err	bitreich.org	70
i+Example : `(=> alert command (:command "tail -n 10 /var/log/messages | grep -v CRITICAL"))`	Err	bitreich.org	70
i+	Err	bitreich.org	70
i+service	Err	bitreich.org	70
i+-------	Err	bitreich.org	70
i+Check if a service is started on the system.	Err	bitreich.org	70
i+	Err	bitreich.org	70
i+> Set the name of the service to test	Err	bitreich.org	70
i+    :name STRING	Err	bitreich.org	70
i+	Err	bitreich.org	70
i+Example : `(=> alert service (:name "mysql-server"))`	Err	bitreich.org	70
i+	Err	bitreich.org	70
i+file-less-than	Err	bitreich.org	70
i+--------------	Err	bitreich.org	70
i+Check if a file has a size less than a specified limit.	Err	bitreich.org	70
i+	Err	bitreich.org	70
i+> Set the path of the file to check.	Err	bitreich.org	70
i+    :path "STRING"	Err	bitreich.org	70
i+        	Err	bitreich.org	70
i+> Set the limit in bytes before triggering an alert.	Err	bitreich.org	70
i+    :limit INTEGER	Err	bitreich.org	70
i+        	Err	bitreich.org	70
i+Example : `(=> alert file-less-than (:path "/var/log/nginx/access.log" :limit 60))`	Err	bitreich.org	70
.
Response: text/plain
Original URLgopher://bitreich.org/0/scm/reed-alert/commit/6e9a2332150...
Content-Typetext/plain; charset=utf-8