On 10/30/24 05:44, Christoph Zechner wrote:
there is a workaround (read: dirty hack) you could use:
put a DIR check in your check list
That's what I did, and said as much.
On 10/29/24 18:55, Grant Taylor via Xymon wrote:
I've used a dir:`COMMAND` in the client-local.cfg (from memory) file that looks for the directory and doesn't report it if it's not there and avoids failing if the directory isn't there. I then have a DIR: ... SIZE<1 in analysis.cfg for the directory in question.
The `COMMAND` part of the dir:`COMMAND` is that the command generates a list of the directories that exist out of the possible directories.
If one of the possible directories doesn't exist, then it won't be listed in `COMMAND`s output and as such won't generate an error for the directory not existing.
For clarity, the possible directories are:
- /run/log/journal
- /var/log/journal
I'm wanting to make sure that /run/log/journal doesn't exist as I want to use persistent journaling to /var/log/journal.
Aside: I suppose I should also make sure that /var/log/journal does exist and that it's being used; read size > 0.
`COMMAND` is a simple `/bin/ls -d /???/log/journal` command that will simply list one or both of the directories if they exist.
P.S. I'm tired of systemd-journald consuming ~4 GB of swap for logs that are in /run (tmpfs) which is memory -> swap backed. I've got multiple systems where logs are 80% of what's in swap. IMHO those logs should live on disk; hence /var/log/journal. -- I'm wanting to have Xymon be a safety net and report when it finds systems using the wrong directory.
--
Grant. . . .