diff options
author | Óscar Nájera <hi@oscarnajera.com> | 2022-11-26 12:09:36 +0100 |
---|---|---|
committer | Óscar Nájera <hi@oscarnajera.com> | 2022-11-26 12:19:45 +0100 |
commit | 736429c3427b50e64977d7a72c5545a595875567 (patch) | |
tree | 2c2f3857ec2149b6311193484b2d0fd6a6e05709 /elisp | |
parent | ef24739a74335871fcce94cb51fff6ef8f9ab919 (diff) | |
download | dotfiles-736429c3427b50e64977d7a72c5545a595875567.tar.gz dotfiles-736429c3427b50e64977d7a72c5545a595875567.tar.bz2 dotfiles-736429c3427b50e64977d7a72c5545a595875567.zip |
Simplify cmk problem log
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/cmk.el | 23 |
1 files changed, 12 insertions, 11 deletions
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 |