Page 1 of 1

check_disk to include Filesystem information

Posted: Thu Jun 02, 2016 5:55 pm
by jchow10
Hi All,
I have been tried different option of check_disk and not much success to include the filesystem information. Does it mean I need to modify the script and write the script to accomplish that?

df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/physical--vol0-lvol01 91G 17G 69G 20% /


./check_nrpe -H 172.16.200.2 -c check_root_disk
DISK OK - free space: / 44723 MB (87% inode=88%); /dev 516845 MB (99% inode=-);....

Ideally, I want the output to include file system information similar to the output below.
./check_nrpe -H 172.16.200.2 -c check_root_disk
DISK OK - free space: / 44723 MB (87% inode=88%), /dev/mapper/physical--vol0-lvol01;.....

Thanks in advance,

JC

Re: check_disk to include Filesystem information

Posted: Thu Jun 02, 2016 6:47 pm
by Box293
Have you tried the -M argument:

Code: Select all

./check_disk -w 10% -c 5% -M -p /
DISK OK - free space: /dev/mapper/VolGroup-lv_root 88534 MB (94% inode=98%);| /dev/mapper/VolGroup-lv_root=4675MB;88378;93288;0;98198

Re: check_disk to include Filesystem information

Posted: Fri Jun 03, 2016 8:15 pm
by jchow10
Yes, I tried -M option. It will comes with Filesystem information but "mount on" information will lose it afterward with "-M" option. It seems you can not have have both filesystem name and mount on information at the same time

Filesystem Size Used Avail Use% Mounted on
rootfs 50G 6.4G 44G 13% /
udev 505G 228K 505G 1% /dev
tmpfs 505G 0 505G 0% /dev/shm
172.16.109.5:/LeapFrog_lf_87h1_HANATierHN1 50G 6.4G 44G 13% /
storage1-4-37-1.benjamin.sap.com:/hana_shared 48G 8.9G 39G 19% /hana/shared

Thanks in advance,

JC

Re: check_disk to include Filesystem information

Posted: Sun Jun 05, 2016 10:42 pm
by Box293
You might have to search the Nagios Exchange for a plugin that does what you are after.

Re: check_disk to include Filesystem information

Posted: Wed Jun 08, 2016 4:38 pm
by jchow10
That is it. I was able to follow the instruction below for writting own plugins. You can close the thread.

https://exchange.nagios.org/directory/T ... pt/details

Thanks all,

JC