NRPE check_disk vs check_drivesize

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
gmackey
Posts: 35
Joined: Wed Mar 22, 2017 1:13 pm
Location: Edmond, OK
Contact:

NRPE check_disk vs check_drivesize

Post by gmackey »

We are using NSClient++ 0.5.x for our Windows Servers and using the following command to customize the output for our disk checks:

Code: Select all

check_nrpe!check_drivesize!-a drive=C warn="used gt 80%" crit="used gt 90%" detail-syntax="%(used)/%(size) used" show-all
Which looks like this: OK 23.756GB/79.483GB used

For our Linux hosts, we use the Nagios XI NRPE agent and use the following command:

Code: Select all

check_nrpe!check_disk!-a '-w 10% -c 5% -p /'
Which looks like this: DISK OK - free space: / 449653 MB (89% inode=99%);

I've looked at the documentation for check_disk and can't see any options to customize the detail syntax like we do for check_drivesize. Could someone tell me if I am correct in my assumption that we would need to install the NSClient++ agent on our Linux boxes and use check_drivesize on the Linux systems if we want to do that? Or is it somehow possible with check_disk? Thanks!
=================================================
Nagios XI 5.6.5 Enterprise
CentOS 6.10 (64-bit) VMware image
SSL implemented and forced, with exception for localhost
bolson

Re: NRPE check_disk vs check_drivesize

Post by bolson »

The plugin "check_disk_space", available on Nagios Exchange would appear to meet your needs.

It returns Total, Used, and Free disk space from a linux host.

Let us know if this works for you.
kyang

Re: NRPE check_disk vs check_drivesize

Post by kyang »

Nice one @bolson!

In case you wanted to see an example of usage.

Code: Select all

Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                       37G  4.3G   31G  13% /
tmpfs                 1.5G     0  1.5G   0% /dev/shm
/dev/sda1             477M   95M  357M  22% /boot

Code: Select all

[root@localhost libexec]# ./check_disk_space -w 60 -c 70 -p /
OK; /: total 36.8GB, used 4.2GB (11.5%), free 30.7GB (83.4%) | 'used space'=4534738944B;23724665241;27678776115;0;39541108736 'used space (pct.)'=11.5%;60;70;0;100
Here's the link to save you some time.
https://exchange.nagios.org/directory/P ... ce/details
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: NRPE check_disk vs check_drivesize

Post by mcapra »

gmackey wrote:Could someone tell me if I am correct in my assumption that we would need to install the NSClient++ agent on our Linux boxes and use check_drivesize on the Linux systems if we want to do that?
NSClient++ doesn't use the official nagios-plugins. It does it's own thing on the back-end. check_drivesize (which is a wrapper for check_drive) in NSClient++ functions totally differently from check_disk in nagios-plugins.

You certainly could build NSClient++ on your Linux machines, but it's an awful lot of work and isn't a setup that gets much testing against Nagios XI.
Former Nagios employee
https://www.mcapra.com/
kyang

Re: NRPE check_disk vs check_drivesize

Post by kyang »

Thanks @mcapra!

@gmackey, let us know if you have any more questions.
gmackey
Posts: 35
Joined: Wed Mar 22, 2017 1:13 pm
Location: Edmond, OK
Contact:

Re: NRPE check_disk vs check_drivesize

Post by gmackey »

Thank you, guys. We've tested the check_disk_space plugin and like the results. We'll get all our Linux disk checks switched over. I appreciate the quick and thorough responses!
=================================================
Nagios XI 5.6.5 Enterprise
CentOS 6.10 (64-bit) VMware image
SSL implemented and forced, with exception for localhost
kyang

Re: NRPE check_disk vs check_drivesize

Post by kyang »

Sounds great! I'll be closing this topic as resolved!

If you have any more questions, feel free to create another thread!

Thank you for using the Nagios Support Forum!
Locked