[Xymon] /snap/core/* Filesystems NOT ok
Adam Thorn
alt36 at cam.ac.uk
Mon Sep 4 18:09:00 CEST 2023
On 04/09/2023 14:00, Becker Christian wrote:
> Hello there,
>
> in our setup, for every single host that has these snap-things, we have:
>
> HOST=hostname
> DISK %^/snap/.+ IGNORE
> INODE %^/snap/.+ IGNORE
>
> And nothing with a wildcard.
> Think i can remember that if you have an entry with a wildcard, and after that another entry with an explicit hostname, that last found explicit entry COULD override the one with the wildcard; but not really sure about that, but worth a try.
See "man analysis.cfg":
"The entire file is evaluated from the top to bottom, and the first
match found is used. So you should put the specific settings first, and
the generic ones last."
A line for "DISK *" thus risks masking later rules for any "DISK
/name/of/mountpoint", subject to how the HOST/PAGE/etc matching rules
are defined.
You can test this with an example analysis.cfg file by running
xymond_client --config=/tmp/analysis.cfg --test
which will give you an interactive prompt to see how your analysis.cfg
is working. (NB it seems that the argument order matters; if you want
to specify an experimental config file rather than using the default
then the --config option has to come first, at least on a Ubuntu 20.04
install!)
If I use:
== begin bad analysis.cfg ==
DEFAULT
DISK * 90 95
HOST=*
DISK %^/snap/.+ IGNORE
== end bad analysis.cfg ==
then the default thresholds of 90/95% are applied to /snap/test. But
swapping the order:
== begin good analysis.cfg ==
HOST=*
DISK %^/snap/.+ IGNORE
DEFAULT
DISK * 90 95
== end good analysis.cfg ==
means the first ("IGNORE") rule gets matched first for /snap/test as
desired.
Adam
More information about the Xymon
mailing list