Is anyone here good with the check_disk command?

I am trying to do something that I think should be pretty basic, set up a couple check_disk commands that will group things into departments and then have one that checks everything else. I am trying to use one directory right now as a very very basic example. I try to do the exclude option in the regex of -r but I am getting the same results…

[root@vmlinuxsecurity etc]# /usr/local/nagios/libexec/check_disk -W 80% -K 90% -r '/boot’
DISK OK - free space: /boot 897 MB (95% inode=99%);| /boot=46MB;;;0;995

[root@vmlinuxsecurity etc]# /usr/local/nagios/libexec/check_disk -W 80% -K 90% -r '^/boot’
DISK OK - free space: /boot 897 MB (95% inode=99%);| /boot=46MB;;;0;995

According to this page:
nagiosplugins.org/man/check_disk

Putting the ^ in there should mean to the command "check the disks on everything not matching the pattern /boot

Why then do both come back with the same results?

You can also just use -A -i ‘/boot’ This includes all partitions (-A) and ignores ‘/boot’ (-i)

not sure if the -r ^ works. I have not found a way to exclude a partition in the include command. i found the documentation you refer to, but can’t make that out tbh :slight_smile: Maybe someone else can decipher this one:

check_disk -w 100 -c 50 -C -w 1000 -c 500 -g sidDATA -r '^/oracle/SID/data.*$'
Checks all filesystems not matching -r at 100M and 50M. The fs matching the -r regex
are grouped which means the freespace thresholds are applied to all disks together