iAdd an option for using starttls to probe ssl-expiration - 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 8b2407ed4b3be6ef0baf6acd5ff3f01a0879ef9e /scm/reed-alert/commit/8b2407ed4b3be6ef0baf6acd5ff3f01a0879ef9e.gph bitreich.org 70
1parent 64185e6f15946e6842a082578a778184a99a3abd /scm/reed-alert/commit/64185e6f15946e6842a082578a778184a99a3abd.gph bitreich.org 70
hAuthor: Solene Rapenne <solene@perso.pw> URL:mailto:solene@perso.pw bitreich.org 70
iDate: Sun, 21 Oct 2018 21:39:30 +0200 Err bitreich.org 70
i Err bitreich.org 70
iAdd an option for using starttls to probe ssl-expiration Err bitreich.org 70
i Err bitreich.org 70
iOriginal code from Denis Fondras Err bitreich.org 70
i Err bitreich.org 70
iDiffstat: Err bitreich.org 70
i M probes.lisp | 26 ++++++++++++++------------ Err bitreich.org 70
i Err bitreich.org 70
i1 file changed, 14 insertions(+), 12 deletions(-) Err bitreich.org 70
i--- Err bitreich.org 70
1diff --git a/probes.lisp b/probes.lisp /scm/reed-alert/file/probes.lisp.gph bitreich.org 70
i@@ -53,10 +53,10 @@ Err bitreich.org 70
i Err bitreich.org 70
i (defun system-load(time) Err bitreich.org 70
i (read-from-string Err bitreich.org 70
i- (let ((command (concatenate 'string Err bitreich.org 70
i- "uptime | awk '{ print $(NF-" Err bitreich.org 70
i- (princ-to-string time) Err bitreich.org 70
i- ") }'"))) Err bitreich.org 70
i+ (let ((command (strcat Err bitreich.org 70
i+ "uptime | awk '{ print $(NF-" Err bitreich.org 70
i+ (princ-to-string time) Err bitreich.org 70
i+ ") }'"))) Err bitreich.org 70
i (uiop:run-program command :output :string)))) Err bitreich.org 70
i Err bitreich.org 70
i (create-probe Err bitreich.org 70
i@@ -124,11 +124,13 @@ Err bitreich.org 70
i (create-probe Err bitreich.org 70
i ssl-expiration Err bitreich.org 70
i (command-return-code Err bitreich.org 70
i- (concatenate 'string Err bitreich.org 70
i- "echo | openssl s_client -showcerts -servername " Err bitreich.org 70
i- (getf params :host) " -connect " Err bitreich.org 70
i- (getf params :host) ":" (princ-to-string Err bitreich.org 70
i- (getf params :port 443)) Err bitreich.org 70
i- " 2>/dev/null | openssl x509 -inform pem -noout -checkend " Err bitreich.org 70
i- (princ-to-string Err bitreich.org 70
i- (getf params :seconds))))) Err bitreich.org 70
i+ (let ((host (getf params :host)) Err bitreich.org 70
i+ (port (princ-to-string (getf params :port 443))) Err bitreich.org 70
i+ (seconds (princ-to-string (getf params :seconds))) Err bitreich.org 70
i+ (starttls (getf params :starttls))) Err bitreich.org 70
i+ (strcat Err bitreich.org 70
i+ "echo | openssl s_client -showcerts -servername " host Err bitreich.org 70
i+ " -connect " host ":" port " 2>/dev/null |" Err bitreich.org 70
i+ "openssl x509 -inform pem -noout " Err bitreich.org 70
i+ (when starttls (strcat " -starttls " starttls)) Err bitreich.org 70
i+ " -checkend " seconds)))) Err bitreich.org 70
.
Response:
text/plain