On RHEL7 check_disk interfering with autofs timeout
Re: On RHEL7 check_disk interfering with autofs timeout
What is the complete command that you are running with this check (filter as needed)? Can you try running it with a -l flag, as this should mount only local drives.
It's possible this was broken before, and fixed now.
It's possible this was broken before, and fixed now.
Former Nagios Employee
Re: On RHEL7 check_disk interfering with autofs timeout
Hi,
I am using:
But I have also tried:
See my original post for output details and change in behaviour after the 'first run'.
Rotty
I am using:
Code: Select all
/opt/nagios/libexec/check_disk -w 20% -c 10% -l -X cifs
Code: Select all
/opt/nagios/libexec/check_disk -w 20% -c 10% -L -X cifs
Rotty
Re: On RHEL7 check_disk interfering with autofs timeout
Ah, I originally missed that and was reading through documentation. At this point, I believe the -l flag should be working, but as it's not I have filed a bug report.
Feel free to track it at https://github.com/nagios-plugins/nagio ... issues/133
Feel free to track it at https://github.com/nagios-plugins/nagio ... issues/133
Former Nagios Employee
Re: On RHEL7 check_disk interfering with autofs timeout
This is bizarre though, and may be specifically related to autofs -
Code: Select all
[root@suse11 libexec]# ./check_disk -w 5 -c 5
DISK OK - free space: / 3725 MB (52% inode=76%); /dev/shm 497 MB (100% inode=99%); /boot 380 MB (84% inode=99%); /mnt/nfs/test2 4871 MB (68% inode=84%);| /=3358MB;7465;7465;0;7470 /dev/shm=0MB;492;492;0;497 /boot=70MB;471;471;0;476 /mnt/nfs/test2=2213MB;7465;7465;0;7470
[root@suse11 libexec]# ./check_disk -w 5 -c 5 -l
DISK OK - free space: / 3725 MB (52% inode=76%); /dev/shm 497 MB (100% inode=99%); /boot 380 MB (84% inode=99%);| /=3358MB;7465;7465;0;7470 /dev/shm=0MB;492;492;0;497 /boot=70MB;471;471;0;476
Former Nagios Employee
Re: On RHEL7 check_disk interfering with autofs timeout
Hi,
Well thanks for taking the time to look, but I think your latest test proves that you the issue is not reproducable. If I were to repeat those commands on my systems I would see this (or something similar to it):
On my system findmnt would return something like this:
And mount would return this:
I guess the out put of findmnt and mount for you would appear like this:
So, given those differences in the ways that mount and findmnt are behaving it's not too suprising that check_disk is behaving differently too. I would say that the fault lies with automount although where exactly it comes from is beyond me (package version? mount options? export options? nfs4 related?).
Thanks for all your help with this, but I think you have proved that it is not an issue with check_disk and that you should close the bug report.
Rotty
Well thanks for taking the time to look, but I think your latest test proves that you the issue is not reproducable. If I were to repeat those commands on my systems I would see this (or something similar to it):
Code: Select all
[root@suse11 libexec]# ./check_disk -w 5 -c 5
DISK OK - free space: / 3725 MB (52% inode=76%); /dev/shm 497 MB (100% inode=99%); /boot 380 MB (84% inode=99%); /mnt/nfs/test 4871 MB (68% inode=84%) /mnt/nfs/test2 4871 MB (68% inode=84%) /mnt/nfs/test3 4871 MB (68% inode=84%);| /=3358MB;7465;7465;0;7470 /dev/shm=0MB;492;492;0;497 /boot=70MB;471;471;0;476 /mnt/nfs/test=2213MB;7465;7465;0;7470 /mnt/nfs/test2=2213MB;7465;7465;0;7470 /mnt/nfs/test3=2213MB;7465;7465;0;7470
Code: Select all
|-/net/nfs/test /etc/auto.net autofs rw,vers=4
| `-/net/nnfs/test nfs:/mnt/test nfs4 rw,vers=4
|-/net/nfs/test2 /etc/auto.net autofs rw,vers=4
| `-/net/nnfs/test2 nfs:/mnt/test2 nfs4 rw,vers=4
|-/net/nfs/test3 /etc/auto.net autofs rw,vers=4
| `-/net/nnfs/test3 nfs:/mnt/test3 nfs4 rw,vers=4
Code: Select all
nfs:/mnt/test on /mnt/test type nfs4 (rw,relatime,vers=4.0,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.3.174,local_lock=none,addr=192.168.3.42)
nfs:/mnt/test2 on /mnt/test2 type nfs4 (rw,relatime,vers=4.0,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.3.174,local_lock=none,addr=192.168.3.42)
nfs:/mnt/test3 on /mnt/test3 type nfs4 (rw,relatime,vers=4.0,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.3.174,local_lock=none,addr=192.168.3.42)
Code: Select all
|-/net/nfs/test /etc/auto.net autofs rw,vers=4
|-/net/nfs/test2 /etc/auto.net autofs rw,vers=4
| `-/net/nnfs/test2 nfs:/mnt/test2 nfs4 rw,vers=4
|-/net/nfs/test3 /etc/auto.net autofs rw,vers=4
Code: Select all
nfs:/mnt/test2 on /mnt/test2 type nfs4 (rw,relatime,vers=4.0,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.3.174,local_lock=none,addr=192.168.3.42)
Thanks for all your help with this, but I think you have proved that it is not an issue with check_disk and that you should close the bug report.
Rotty
Re: On RHEL7 check_disk interfering with autofs timeout
While the issue could be autofs, I still am leaving it up in the air as a way of how check_disk communicates based on autofs.
I've also added a link to this thread with the report for anyone that may be looking more into it.
I've also added a link to this thread with the report for anyone that may be looking more into it.
Former Nagios Employee
Re: On RHEL7 check_disk interfering with autofs timeout
r0tty,
I tested this on a lab system, and everything appears to be in working order. I replicated your setup on CentOS6 first (ignore the hostname, it's not running OpenSUSE):
According to the above, the results are in line with my expectations.
Additional information:
Moving on to CentOS7:
Everything works properly for me in CentOS7 as well. I hope the above helps you glean useful information about some differences in our setups that may impact the problem. Let me know, thank you!
I tested this on a lab system, and everything appears to be in working order. I replicated your setup on CentOS6 first (ignore the hostname, it's not running OpenSUSE):
Code: Select all
[root@suse11 misc]# cat /etc/auto.misc
#
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# Details may be found in the autofs(5) manpage
cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom
# the following entries are samples to pique your imagination
#linux -ro,soft,intr ftp.example.org:/pub/linux
#boot -fstype=ext2 :/dev/hda1
#floppy -fstype=auto :/dev/fd0
#floppy -fstype=ext2 :/dev/fd0
#e2floppy -fstype=ext2 :/dev/fd0
#jaz -fstype=ext2 :/dev/sdc1
#removable -fstype=ext2 :/dev/hdd
test2 -rw,soft,intr,rsize=8192,wsize=8192 192.168.x.x:/mnt/test2
test3 -rw,soft,intr,rsize=8192,wsize=8192 192.168.x.x:/mnt/test3
test4 -rw,soft,intr,rsize=8192,wsize=8192 192.168.x.x:/mnt/test4
Code: Select all
[root@suse11 misc]# cd /misc
[root@suse11 misc]# cd test2
[root@suse11 test2]# cd ../test3
[root@suse11 test3]# cd ../test4
[root@suse11 test4]# cd ..
[root@suse11 misc]# /usr/local/nagios/libexec/check_disk -w 5 -c 10
DISK OK - free space: / 3687 MB (52% inode=76%); /dev/shm 497 MB (100% inode=99%); /boot 380 MB (84% inode=99%); /misc/test2 4867 MB (68% inode=84%); /misc/test3 4867 MB (68% inode=84%); /misc/test4 4867 MB (68% inode=84%);| /=3397MB;7465;7460;0;7470 /dev/shm=0MB;492;487;0;497 /boot=70MB;471;466;0;476 /misc/test2=2217MB;7465;7460;0;7470 /misc/test3=2217MB;7465;7460;0;7470 /misc/test4=2217MB;7465;7460;0;7470
[root@suse11 misc]# umount test4
[root@suse11 misc]# /usr/local/nagios/libexec/check_disk -w 5 -c 10
DISK OK - free space: / 3687 MB (52% inode=76%); /dev/shm 497 MB (100% inode=99%); /boot 380 MB (84% inode=99%); /misc/test2 4867 MB (68% inode=84%); /misc/test3 4867 MB (68% inode=84%);| /=3397MB;7465;7460;0;7470 /dev/shm=0MB;492;487;0;497 /boot=70MB;471;466;0;476 /misc/test2=2217MB;7465;7460;0;7470 /misc/test3=2217MB;7465;7460;0;7470
[root@suse11 misc]# /usr/local/nagios/libexec/check_disk -w 5 -c 10 -l
DISK OK - free space: / 3687 MB (52% inode=76%); /dev/shm 497 MB (100% inode=99%); /boot 380 MB (84% inode=99%);| /=3397MB;7465;7460;0;7470 /dev/shm=0MB;492;487;0;497 /boot=70MB;471;466;0;476
Additional information:
Code: Select all
[root@suse11 misc]# findmnt
TARGET SOURCE FSTYPE OPTIONS
/ /dev/mapper/VolGroup-lv_root ext4 rw,relatime,barrier=1,data=ordered
├─/proc proc proc rw,relatime
│ ├─/proc/bus/usb /proc/bus/usb usbfs rw,relatime
│ └─/proc/sys/fs/binfmt_misc binfmt_misc rw,relatime
├─/sys sysfs sysfs rw,relatime
├─/dev devtmpfs devtmpfs rw,relatime,size=496228k,nr_inodes=124057,mode=755
│ ├─/dev/pts devpts devpts rw,relatime,gid=5,mode=620,ptmxmode=000
│ └─/dev/shm tmpfs tmpfs rw,relatime
├─/boot /dev/sda1 ext4 rw,relatime,barrier=1,data=ordered
├─/var/lib/nfs/rpc_pipefs sunrpc rpc_pipefs rw,relatime
├─/misc /etc/auto.misc autofs rw,relatime,fd=7,pgrp=11070,timeout=60,minproto=5,maxproto=5,indire
│ ├─/misc/test2 192.168.x.x:/mnt/test2[/test2] nfs4 rw,relatime,vers=4,rsize=8192,wsize=8192,namlen=255,soft,proto=tcp,
│ └─/misc/test3 192.168.x.x:/mnt/test3[/test3] nfs4 rw,relatime,vers=4,rsize=8192,wsize=8192,namlen=255,soft,proto=tcp,
└─/net -hosts autofs rw,relatime,fd=13,pgrp=11070,timeout=300,minproto=5,maxproto=5,indi
Moving on to CentOS7:
Code: Select all
[root@localhost misc]# cat /etc/*relea*
CentOS Linux release 7.1.1503 (Core)
Derived from Red Hat Enterprise Linux 7.1 (Source)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
CentOS Linux release 7.1.1503 (Core)
CentOS Linux release 7.1.1503 (Core)
cpe:/o:centos:centos:7
rpm -q autofs
autofs-5.0.7-54.el7.x86_64
rpm -q nfs-utils
nfs-utils-1.3.0-0.21.el7.x86_64
/usr/local/nagios/libexec/check_disk --help | head -n1
check_disk v2.0.3 (nagios-plugins 2.0.3)
[root@localhost misc]# cd /misc
[root@localhost misc]# ls test2
[root@localhost misc]# ls test3
[root@localhost misc]# ls test4
[root@localhost misc]# /usr/local/nagios/libexec/check_disk -w 5 -c 10
DISK OK - free space: / 15825 MB (87% inode=99%); /dev 481 MB (100% inode=99%); /dev/shm 489 MB (100% inode=99%); /run 440 MB (89% inode=99%); /sys/fs/cgroup 489 MB (100% inode=99%); /boot 148 MB (50% inode=99%); /run/user/0 97 MB (100% inode=99%); /run/user/1001 97 MB (100% inode=99%); /misc/test2 4867 MB (68% inode=84%); /misc/test3 4867 MB (68% inode=84%); /misc/test4 4867 MB (68% inode=84%);| /=2295MB;18116;18111;0;18121 /dev=0MB;476;471;0;481 /dev/shm=0MB;484;479;0;489 /run=49MB;484;479;0;489 /sys/fs/cgroup=0MB;484;479;0;489 /boot=148MB;291;286;0;296 /run/user/0=0MB;92;87;0;97 /run/user/1001=0MB;92;87;0;97 /misc/test2=2217MB;7465;7460;0;7470 /misc/test3=2217MB;7465;7460;0;7470 /misc/test4=2217MB;7465;7460;0;7470
[root@localhost misc]# umount test4
[root@localhost misc]# /usr/local/nagios/libexec/check_disk -w 5 -c 10
DISK OK - free space: / 15824 MB (87% inode=99%); /dev 481 MB (100% inode=99%); /dev/shm 489 MB (100% inode=99%); /run 440 MB (89% inode=99%); /sys/fs/cgroup 489 MB (100% inode=99%); /boot 148 MB (50% inode=99%); /run/user/0 97 MB (100% inode=99%); /run/user/1001 97 MB (100% inode=99%); /misc/test2 4867 MB (68% inode=84%); /misc/test3 4867 MB (68% inode=84%);| /=2296MB;18116;18111;0;18121 /dev=0MB;476;471;0;481 /dev/shm=0MB;484;479;0;489 /run=49MB;484;479;0;489 /sys/fs/cgroup=0MB;484;479;0;489 /boot=148MB;291;286;0;296 /run/user/0=0MB;92;87;0;97 /run/user/1001=0MB;92;87;0;97 /misc/test2=2217MB;7465;7460;0;7470 /misc/test3=2217MB;7465;7460;0;7470
[root@localhost misc]# /usr/local/nagios/libexec/check_disk -w 5 -c 10 -l
DISK OK - free space: / 15824 MB (87% inode=99%); /dev 481 MB (100% inode=99%); /dev/shm 489 MB (100% inode=99%); /run 440 MB (89% inode=99%); /sys/fs/cgroup 489 MB (100% inode=99%); /boot 148 MB (50% inode=99%); /run/user/0 97 MB (100% inode=99%); /run/user/1001 97 MB (100% inode=99%);| /=2296MB;18116;18111;0;18121 /dev=0MB;476;471;0;481 /dev/shm=0MB;484;479;0;489 /run=49MB;484;479;0;489 /sys/fs/cgroup=0MB;484;479;0;489 /boot=148MB;291;286;0;296 /run/user/0=0MB;92;87;0;97 /run/user/1001=0MB;92;87;0;97
[root@localhost misc]# findmnt | grep test
│ ├─/misc/test2 192.168.x.x:/mnt/test2 nfs4 rw,relatime,vers=4.0,rsize=8192,wsize=8192,namlen=255,soft,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.x.x,local_lock=none,addr=192.168.x.x
│ └─/misc/test3 192.168.x.x:/mnt/test3 nfs4 rw,relatime,vers=4.0,rsize=8192,wsize=8192,namlen=255,soft,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.x.x,local_lock=none,addr=192.168.x.x