From 5035f0e05f101de3f9c4dc23619c8d5e3ca03d9f Mon Sep 17 00:00:00 2001 From: Tobias Bauriedel Date: Tue, 10 Jan 2023 09:12:29 +0100 Subject: [PATCH] add extended corosync information --- modules/corosync/collector.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/corosync/collector.go b/modules/corosync/collector.go index e7b39e5..456ef52 100644 --- a/modules/corosync/collector.go +++ b/modules/corosync/collector.go @@ -14,11 +14,19 @@ var relevantPaths = []string{ var possibleDaemons = []string{ "/lib/systemd/system/corosync.service", "/usr/lib/systemd/system/corosync.service", + "/usr/lib/systemd/system/pacemaker.service", +} + +var services = []string{ + "corosync", + "pacemaker", } var files = []string{ "/etc/corosync/corosync.conf", "/var/lib/pacemaker/cib/cib.xml", + "/var/log/corosync/corosync.log", + "/var/log/pacemaker/pacemaker.log", } var commands = map[string][]string{ @@ -52,6 +60,10 @@ func Collect(c *collection.Collection) { c.AddFilesIfFound(ModuleName, file) } + for _, service := range services { + c.AddServiceStatusRaw(ModuleName+"service-"+service+".txt", service) + } + for name, cmd := range commands { c.AddCommandOutput(ModuleName+"/"+name, cmd[0], cmd[1:]...) }