Skip to content

Commit 44fbebe

Browse files
authored
add extended corosync information (#61)
1 parent e046424 commit 44fbebe

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

modules/corosync/collector.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,19 @@ var relevantPaths = []string{
1414
var possibleDaemons = []string{
1515
"/lib/systemd/system/corosync.service",
1616
"/usr/lib/systemd/system/corosync.service",
17+
"/usr/lib/systemd/system/pacemaker.service",
18+
}
19+
20+
var services = []string{
21+
"corosync",
22+
"pacemaker",
1723
}
1824

1925
var files = []string{
2026
"/etc/corosync/corosync.conf",
2127
"/var/lib/pacemaker/cib/cib.xml",
28+
"/var/log/corosync/corosync.log",
29+
"/var/log/pacemaker/pacemaker.log",
2230
}
2331

2432
var commands = map[string][]string{
@@ -52,6 +60,10 @@ func Collect(c *collection.Collection) {
5260
c.AddFilesIfFound(ModuleName, file)
5361
}
5462

63+
for _, service := range services {
64+
c.AddServiceStatusRaw(ModuleName+"service-"+service+".txt", service)
65+
}
66+
5567
for name, cmd := range commands {
5668
c.AddCommandOutput(ModuleName+"/"+name, cmd[0], cmd[1:]...)
5769
}

0 commit comments

Comments
 (0)