[FIX] Load average wasn't working in some conditions - 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 84cc333bfe3d62aff0d2ff899f58b034ac2ca542
DIR parent 8a7e81410bf964feeecd139d551ddd143f730e58
HTML Author: solene rapenne <solene@dataswamp.org>
Date: Fri, 14 Oct 2016 14:21:02 +0200
[FIX] Load average wasn't working in some conditions
Diffstat:
M probes.lisp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
DIR diff --git a/probes.lisp b/probes.lisp
@@ -40,28 +40,28 @@
(defun system-load(time)
(read-from-string
(let ((command (concatenate 'string
- "uptime | awk '{ print $"
+ "uptime | awk '{ print $(NF-"
(princ-to-string time)
- " }'")))
+ ") }'")))
(uiop:run-program command :output :string))))
(create-probe
load-average-1
- (let ((load (system-load 10)))
+ (let ((load (system-load 2)))
(if (< load (getf params :limit))
t
(list nil load))))
(create-probe
load-average-5
- (let ((load (system-load 11)))
+ (let ((load (system-load 1)))
(if (< load (getf params :limit))
t
(list nil load))))
(create-probe
load-average-15
- (let ((load (system-load 12)))
+ (let ((load (system-load 0)))
(if (< load (getf params :limit))
t
(list nil load))))