Ignore smbfs,cifs,tmpfs

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
scrizo
Posts: 4
Joined: Thu Dec 29, 2016 9:52 am

Ignore smbfs,cifs,tmpfs

Post 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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Ignore smbfs,cifs,tmpfs

Post by rkennedy »

You should be able to use -x -

Code: Select all

 -x, --exclude_device=PATH <STRING>
    Ignore device (only works if -p unspecified)
Former Nagios Employee
scrizo
Posts: 4
Joined: Thu Dec 29, 2016 9:52 am

Re: Ignore smbfs,cifs,tmpfs

Post 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
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Ignore smbfs,cifs,tmpfs

Post 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)
Former Nagios employee
https://www.mcapra.com/
Locked