SMOLNET PORTAL home about changes
iCorrectly report the previous success state - 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 fd80ed68f6fbb92860af43c7bb0542c5e90022fe	/scm/reed-alert/commit/fd80ed68f6fbb92860af43c7bb0542c5e90022fe.gph	bitreich.org	70
1parent 9698c24926a46f573d376851a397799f4f0fc41d	/scm/reed-alert/commit/9698c24926a46f573d376851a397799f4f0fc41d.gph	bitreich.org	70
hAuthor: Solene Rapenne <solene@perso.pw>	URL:mailto:solene@perso.pw	bitreich.org	70
iDate:   Tue,  9 Jul 2019 17:04:17 +0200	Err	bitreich.org	70
i	Err	bitreich.org	70
iCorrectly report the previous success state	Err	bitreich.org	70
i	Err	bitreich.org	70
iDiffstat:	Err	bitreich.org	70
i  M functions.lisp                      |      16 ++++++++++------	Err	bitreich.org	70
i	Err	bitreich.org	70
i1 file changed, 10 insertions(+), 6 deletions(-)	Err	bitreich.org	70
i---	Err	bitreich.org	70
1diff --git a/functions.lisp b/functions.lisp	/scm/reed-alert/file/functions.lisp.gph	bitreich.org	70
i@@ -121,11 +121,11 @@	Err	bitreich.org	70
i               (delete-file filepath))	Err	bitreich.org	70
i 	Err	bitreich.org	70
i             ;; it was a failure and then it's back to normal state	Err	bitreich.org	70
i-            (when triggered-before?	Err	bitreich.org	70
i-              (uiop:run-program (trigger-alert level fonction params t 'success) :output t)	Err	bitreich.org	70
i-              (setf previous-state nil))	Err	bitreich.org	70
i-            ;; in any case we return t because it's ok	Err	bitreich.org	70
i-            t)	Err	bitreich.org	70
i+            (if triggered-before?	Err	bitreich.org	70
i+                (progn	Err	bitreich.org	70
i+                  (uiop:run-program (trigger-alert level fonction params t 'success) :output t)	Err	bitreich.org	70
i+                  (setf previous-state nil))	Err	bitreich.org	70
i+                (setf previous-state t)))	Err	bitreich.org	70
i 	Err	bitreich.org	70
i           ;; FAILURE HANDLING	Err	bitreich.org	70
i           (let ((trigger-now? (or	Err	bitreich.org	70
i@@ -152,7 +152,11 @@	Err	bitreich.org	70
i               level fonction (format nil "~{~A ~}" params)	Err	bitreich.org	70
i               (if previous-state "SUCCESS" "ERROR")	Err	bitreich.org	70
i               (if current-state "SUCCESS" "ERROR")	Err	bitreich.org	70
i-              trigger-state (+ 1 tries)))	Err	bitreich.org	70
i+              trigger-state	Err	bitreich.org	70
i+              ;; use tries variable only if previous errors	Err	bitreich.org	70
i+              (if previous-state	Err	bitreich.org	70
i+                  0	Err	bitreich.org	70
i+                  (+ 1 tries))))	Err	bitreich.org	70
i     current-state))	Err	bitreich.org	70
i 	Err	bitreich.org	70
i ;; abort when using ctrl+c instead of dropping to debugger	Err	bitreich.org	70
.
Response: text/plain
Original URLgopher://bitreich.org/0/scm/reed-alert/commit/fd80ed68f6f...
Content-Typetext/plain; charset=utf-8