Weird check_disk results

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Weird check_disk results

Post by WillemDH »

Hello,

I'm experiencing some weird check_disk results on Red Hat 7.5

Code: Select all

/usr/local/nagios/libexec/check_disk -V
check_disk v2.0.3 (nagios-plugins 2.0.3)
Check for different volumes give me the same result:

Disk info on the system I'm trying to monitor:

Code: Select all

sudo fdisk -l | grep '^Disk'
[sudo] password for user:
Disk /dev/sda: 64.4 GB, 64424509440 bytes, 125829120 sectors
Disk label type: dos
Disk identifier: 0x0000e1cf
Disk /dev/sdb: 53.7 GB, 53687091200 bytes, 104857600 sectors
Disk label type: dos
Disk identifier: 0x05c1df40
Disk /dev/mapper/rhel-root: 8589 MB, 8589934592 bytes, 16777216 sectors
Disk /dev/mapper/rhel-swap: 4290 MB, 4290772992 bytes, 8380416 sectors
Disk /dev/mapper/rhel-var: 42.9 GB, 42949672960 bytes, 83886080 sectors
Disk /dev/mapper/rhel-user_local_bin: 4294 MB, 4294967296 bytes, 8388608 sectors
Disk /dev/mapper/rhel-tmp: 3221 MB, 3221225472 bytes, 6291456 sectors
Disk /dev/mapper/docker-253:2-100673825-34243a2055cacfe380944e7ef4fe937b4e56d369998d1c958af5bb9375797a03: 10.7 GB, 10737418240 bytes, 20971520 sectors
Disk /dev/mapper/docker-253:2-100673825-bf658313af9e95c972b4891bc960ed314a5fb660cd898567cab27b1592c3cd91: 10.7 GB, 10737418240 bytes, 20971520 sectors

Code: Select all

df -h
df: ‘/mnt/backup’: Stale file handle
Filesystem                                   Size  Used Avail Use% Mounted on
/dev/mapper/rhel-root                        8.0G  3.4G  4.7G  43% /
devtmpfs                                     7.8G     0  7.8G   0% /dev
tmpfs                                        7.8G     0  7.8G   0% /dev/shm
tmpfs                                        7.8G  1.4M  7.8G   1% /run
tmpfs                                        7.8G     0  7.8G   0% /sys/fs/cgroup
/dev/sda1                                   1014M  223M  792M  22% /boot
/dev/mapper/rhel-var                          40G   14G   27G  33% /var
/dev/mapper/rhel-tmp                         3.0G   33M  3.0G   2% /tmp
/dev/mapper/rhel-user_local_bin              4.0G   33M  4.0G   1% /user/local/bin
svm_dg03.gentgrp.gent.be:/openshift_backups   35G   13G   23G  36% /mnt/backup_pvc
tmpfs                                        1.6G     0  1.6G   0% /run/user/233106104
tmpfs                                        1.6G     0  1.6G   0% /run/user/233029327
I need to monitor dis usage on:

Code: Select all

/
/root
/tmp
/var
/usr/local/bin

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H myserver -t 120 -c check_disk -a '-w 10% -c 5% -p /'
DISK OK - free space: / 4745 MB (57.99% inode=98%);| /=3436MB;7363;7772;0;8182

/usr/local/nagios/libexec/check_nrpe -H myserver -t 120 -c check_disk -a '-w 10% -c 5% -p /root'
DISK OK - free space: / 4745 MB (57.99% inode=98%);| /=3436MB;7363;7772;0;8182

/usr/local/nagios/libexec/check_nrpe -H myserver -t 120 -c check_disk -a '-w 10% -c 5% -p /tmp'
DISK OK - free space: /tmp 3029 MB (98.94% inode=100%);| /tmp=32MB;2755;2908;0;3062

/usr/local/nagios/libexec/check_nrpe -H myserver -t 120 -c check_disk -a '-w 10% -c 5% -p /var'
DISK OK - free space: /var 27460 MB (67.07% inode=100%);| /var=13479MB;36846;38893;0;40940

/usr/local/nagios/libexec/check_nrpe -H myserver -t 120 -c check_disk -a '-w 10% -c 5% -p /usr/local/bin'
DISK OK - free space: / 4745 MB (57.99% inode=98%);| /=3436MB;7363;7772;0;8182
As you can see the results from /, /root and /usr/local/bin are actually identical. What could cause this behaviour?

Grtz

Willem
Nagios XI 5.8.1
https://outsideit.net
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Weird check_disk results

Post by scottwilkerson »

/root and /usr/local/bin are not separate mount points

you do not have a /root mount point and you have a /user/local/bin not a /usr/local/bin mount point, so they fall back to the mount of /
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Weird check_disk results

Post by WillemDH »

Right,

Seems a typo has been made with /user/local/bin ...

I was able to make this work. Thread can be closed.

Thanks!!
Nagios XI 5.8.1
https://outsideit.net
Locked