aboutsummaryrefslogtreecommitdiffstats
path: root/elisp
diff options
context:
space:
mode:
authorÓscar Nájera <hi@oscarnajera.com>2022-07-08 21:23:13 +0200
committerÓscar Nájera <hi@oscarnajera.com>2022-07-08 21:23:13 +0200
commitda93014264e13d7acbd2f80cef8acee78466fa61 (patch)
treed05fba90fb3e0a9c65e442a11b8cfdb7f8f36597 /elisp
parent1044126dd9021d16f8639b4c562ab50ce8fd63b8 (diff)
downloaddotfiles-da93014264e13d7acbd2f80cef8acee78466fa61.tar.gz
dotfiles-da93014264e13d7acbd2f80cef8acee78466fa61.tar.bz2
dotfiles-da93014264e13d7acbd2f80cef8acee78466fa61.zip
cmk csv query
Diffstat (limited to 'elisp')
-rw-r--r--elisp/cmk.el20
1 files changed, 20 insertions, 0 deletions
diff --git a/elisp/cmk.el b/elisp/cmk.el
index 1a6729d..55e4435 100644
--- a/elisp/cmk.el
+++ b/elisp/cmk.el
@@ -97,6 +97,26 @@ Negate:\n\n")
(tabulated-list-print)
(display-buffer (current-buffer))))))
+(let* ((cmks (make-network-process
+ :name "Checkmk"
+ :remote "/tmp/ingridcmk.socket"
+ ;; :coding '(binary . binary)
+ :buffer "CMK"
+ ;; :filter (lambda (_process string)
+ ;; (message "%S" string))
+ :sentinel (lambda (process event)
+ (message "Process: %s had the event '%s'" process event)))))
+
+ (with-current-buffer (process-buffer cmks) (erase-buffer))
+ (process-send-string cmks "GET services
+Columns: service_description host_name service_perf_data
+Filter: service_description ~ Filesystem
+OutputFormat: csv
+Separators: 10 124 44 124\n\n")
+ (accept-process-output cmks 0.1)
+ (with-current-buffer (process-buffer cmks)
+ (goto-char (point-min))
+ (display-buffer (current-buffer))))
(provide 'cmk)
;;; cmk.el ends here