From 736429c3427b50e64977d7a72c5545a595875567 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Sat, 26 Nov 2022 12:09:36 +0100 Subject: Simplify cmk problem log --- elisp/cmk.el | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'elisp') diff --git a/elisp/cmk.el b/elisp/cmk.el index 61b71df..2b6f449 100644 --- a/elisp/cmk.el +++ b/elisp/cmk.el @@ -74,18 +74,18 @@ Default is \"%Y-%m-%d %H:%M\"." ("Check output" 18 t :column "service_plugin_output" :parser cmk-purge-bangs))) (defconst cmk-log-col-spec - '(("host_state" 5 t :column "host_state" :parser cmk-state-coloring) + '(;("host_state" 5 t :column "host_state" :parser cmk-state-coloring) + ("STATE" 5 t :column "log_state" :parser cmk-state-coloring) + ;; ("lsttype" 8 t :column "log_state_type") ("Host" 9 t :column "host_name") ("Service" 12 t :column "service_description") ("log_time" 16 t :column "log_time" :parser cmk-timestamp-to-date) - ("log_command_name" 10 t :column "log_command_name") - ("log_comment" 15 t :column "log_comment") - ("lineno" 8 t :column "log_lineno") - ("lstate" 8 t :column "log_state") - ("lsttype" 8 t :column "log_state_type") - ("log_type" 8 t :column "log_type") - ("host_scheduled_downtime_depth" 5 t :column "host_scheduled_downtime_depth") - ("host_has_been_checked" 5 t :column "host_has_been_checked") + ;; ("log_command_name" 10 t :column "log_command_name") + ;; ("log_comment" 15 t :column "log_comment") + ;; ("lineno" 8 t :column "log_lineno") + ("log_type" 16 t :column "log_type") + ;; ("host_scheduled_downtime_depth" 5 t :column "host_scheduled_downtime_depth") + ;; ("host_has_been_checked" 5 t :column "host_has_been_checked") ("log_plugin_output" 5 t :column "log_plugin_output"))) (defun cmk-parse-rows (buffer column-spec) @@ -195,10 +195,11 @@ Negate:")) Filter: class = 1 Filter: class = 3 Filter: class = 8 -Or: 3" +Or: 3 +Filter: log_state_type = HARD" (floor (- (time-to-seconds (current-time)) - (* 4 3600)))))) + (* 24 3600)))))) ;;; Get a different csv -- cgit v1.2.3