Page 1 of 1

Ignore smbfs,cifs,tmpfs

Posted: Thu Dec 29, 2016 9:56 am
by scrizo
Hello all is there a way to ignore types rather than share names. with like example /usr/lib64/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -W $ARG1$ -K $ARG2$ -el -X smbfs -X tmpfs -X cifs

Re: Ignore smbfs,cifs,tmpfs

Posted: Thu Dec 29, 2016 10:36 am
by rkennedy
You should be able to use -x -

Code: Select all

 -x, --exclude_device=PATH <STRING>
    Ignore device (only works if -p unspecified)

Re: Ignore smbfs,cifs,tmpfs

Posted: Thu Dec 29, 2016 11:04 am
by scrizo
Yeah but can I ignore it based on filesytem type, because I would need to add a lot of paths using that command

Re: Ignore smbfs,cifs,tmpfs

Posted: Thu Dec 29, 2016 11:11 am
by mcapra
A capital -X might be more appropriate:

Code: Select all

-X, --exclude-type=TYPE
Ignore all filesystems of indicated type (may be repeated)
Or a -N if you're only including certain types:

Code: Select all

-N, --include-type=TYPE
Check only filesystems of indicated type (may be repeated)