aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOscar Najera <hi@oscarnajera.com>2024-10-20 02:40:06 +0200
committerOscar Najera <hi@oscarnajera.com>2024-10-20 02:40:06 +0200
commitc9946684cb6e38c9a7c3353bc8e769ca3b958770 (patch)
treeef882330254a0e069b174453f454cc4065ecd08a
parent08da0f5665089de3b3efcd8be67ecd6911b2e34c (diff)
downloaddotfiles-c9946684cb6e38c9a7c3353bc8e769ca3b958770.tar.gz
dotfiles-c9946684cb6e38c9a7c3353bc8e769ca3b958770.tar.bz2
dotfiles-c9946684cb6e38c9a7c3353bc8e769ca3b958770.zip
cmk on port instead of socket
-rw-r--r--config/shepherd/init.d/cmk.scm2
-rw-r--r--elisp/cmk.el17
2 files changed, 10 insertions, 9 deletions
diff --git a/config/shepherd/init.d/cmk.scm b/config/shepherd/init.d/cmk.scm
index 97ced9f..07f32d4 100644
--- a/config/shepherd/init.d/cmk.scm
+++ b/config/shepherd/init.d/cmk.scm
@@ -7,7 +7,7 @@
"-o" "ServerAliveInterval=60"
"-o" "ExitOnForwardFailure=yes"
"-o" "StreamLocalBindUnlink=yes"
- "-L" "/tmp/ingridcmk.socket:/omd/sites/ingrid/tmp/run/live"
+ "-L" "6565:/omd/sites/ingrid/tmp/run/live"
"ingrid@ingrid")
#:log-file "/tmp/ingrid-cmk.log"
#:environment-variables '("SSH_AUTH_SOCK=/run/user/1000/gnupg/S.gpg-agent.ssh"))
diff --git a/elisp/cmk.el b/elisp/cmk.el
index 6023cf0..52462e7 100644
--- a/elisp/cmk.el
+++ b/elisp/cmk.el
@@ -52,7 +52,8 @@ Default is \"%Y-%m-%d %H:%M\"."
"One shot socket connection. non-nil KEEP-BUFFER after socket closes."
(make-network-process
:name "Checkmk"
- :remote "/tmp/ingridcmk.socket"
+ :host 'local
+ :service 6565
:buffer "CMK"
:sentinel (lambda (process event)
(message "Process: %s had the event '%s'" process (string-trim event))
@@ -103,13 +104,13 @@ Default is \"%Y-%m-%d %H:%M\"."
(or (plist-get (cdddr spec) :parser) #'identity))
column-spec)))
(while (not (eobp))
- (push
- (list (count-lines 1 (point))
- (cl-map 'vector
- (lambda (parser entry) (funcall parser entry))
- parsers
- (split-string (thing-at-point 'line t) ";" nil "\n")))
- rows)
+ (thread-first
+ (list (count-lines 1 (point))
+ (cl-map 'vector
+ (lambda (parser entry) (funcall parser entry))
+ parsers
+ (split-string (thing-at-point 'line t) ";" nil "\n")))
+ (push rows))
(forward-line))
(nreverse rows))))