Page 1 of 1

Check_disk usage for linux servers

Posted: Tue Jan 09, 2018 3:29 pm
by naranant
Hi,

I am trying to monitor the file system usage in the Linux environment but not able to figure out the usage of the right syntax.

Below is one of the example where the usage is 99% but still getting the result as Disk ok.. Ideally i need to get the critical alert when the disk usage is above 95%.

[[email protected] ~]$ /usr/local/nagios/libexec/check_nrpe -H 1Xx.xx.Xxx.1xx -t 30 -c check_disk -a '/app/testjpl -w 10 -c 5'
DISK OK - free space: /app/testjpl 52 MB (1% inode=99%);| /app/testjpl=4602MB;;;0;4911

Re: Check_disk usage for linux servers

Posted: Tue Jan 09, 2018 4:18 pm
by cdienger
I believe the path should be at the end. Try the following:

/usr/local/nagios/libexec/check_nrpe -H 1Xx.xx.Xxx.1xx -t 30 -c check_disk -a '-w 10% -c 5% /app/testjpl'

Re: Check_disk usage for linux servers

Posted: Tue Jan 09, 2018 7:40 pm
by naranant
I have tried with that option also but in spite of 98% usage, the disk still shows as ok.


[[email protected] ~]$ /usr/local/nagios/libexec/check_nrpe -H 1X.x.xx.xx -t 30 -c check_disk -a '-w 10% -c 5% /app'
DISK OK - free space: /app 47504 MB (98% inode=98%);| /app=618MB;45241;47754;0;50268

Re: Check_disk usage for linux servers

Posted: Wed Jan 10, 2018 11:01 am
by lmiltchev
According to the plugin's output, you should have 98% free space on /app... Can you run the following commands on the remote machine and show the output?

Code: Select all

mount
df -h
/usr/local/nagios/libexec/check_disk -w 10% -c 5% -p /app
Note: Modify the path to the check_disk plugin if it's different on your system.

Re: Check_disk usage for linux servers

Posted: Thu Jan 11, 2018 8:24 am
by naranant
@lmiltchev : I was reading the output wrong it worked for me after putting the path at the end of the command. Thank you all for your help.

Re: Check_disk usage for linux servers

Posted: Thu Jan 11, 2018 11:59 am
by lmiltchev
Great! I am glad your issue has been resolved! I will be closing this topic now. If you have any more questions/issues, please start a new thread.