Page 2 of 5

Re: Monitor Disk Usage of Windows Mount Points...

Posted: Tue Aug 11, 2015 10:30 pm
by Box293
To add to what @tgriep has provided, I did some tests and it appears as though you need at least NSClient 0.4.2.x versions onwards to be able to check mount points.

Once you have the updated version it will be checked it by default:

Code: Select all

Command:
check_nrpe -H win2008r2-01 -c CheckDriveSize

Output:
OK All 6 drive(s) are ok|'C:\ used'=19.01372GB;47.9203;53.91034;0;59.90038 'C:\ used %'=31%;79;89;0;100 'D:\ used'=0B;0;0;0;0 'E:\ used'=0.08886GB;31.99765;35.99736;0;39.99706 'E:\ used %'=0%;79;89;0;100 'Q:\ used'=0.0884GB;19.99765;22.49736;0;24.99706 'Q:\ used %'=0%;79;89;0;100 '\\?\Volume{791a0772-737e-11e4-98ac-806e6f6e6963}\ used'=29.19921MB;79.99687;89.99648;0;99.99609 '\\?\Volume{791a0772-737e-11e4-98ac-806e6f6e6963}\ used %'=29%;79;89;0;100 'C:\Mounted Disks\A Mounted Disk\ used'=0.08816GB;14.39765;16.19736;0;17.99706 'C:\Mounted Disks\A Mounted Disk\ used %'=0%;79;89;0;100
Or you can target it specifically:

Code: Select all

Command:
check_nrpe -H win2008r2-01 -c CheckDriveSize -a Drive='C:\Mounted Disks\A Mounted Disk'

Output:
OK All 1 drive(s) are ok|'C:\Mounted Disks\A Mounted Disk used'=0.08816GB;14.39765;16.19736;0;17.99706 'C:\Mounted Disks\A Mounted Disk used %'=0%;79;89;0;100

Re: Monitor Disk Usage of Windows Mount Points...

Posted: Tue Aug 18, 2015 1:56 pm
by jasonlehman
Sorry for the delay, been putting out fires.
Here is the output to get the version...

I (0,4,1,105 2014-04-28) seem to be doing fine...

Re: Monitor Disk Usage of Windows Mount Points...

Posted: Tue Aug 18, 2015 2:56 pm
by hsmith
jasonlehman wrote:Sorry for the delay, been putting out fires.
Here is the output to get the version...

I (0,4,1,105 2014-04-28) seem to be doing fine...
Box293 wrote:To add to what @tgriep has provided, I did some tests and it appears as though you need at least NSClient 0.4.2.x versions onwards to be able to check mount points.
Looks like you need to upgrade.

Re: Monitor Disk Usage of Windows Mount Points...

Posted: Mon Aug 24, 2015 12:41 pm
by jasonlehman
Ok, I've updated to...

NSClient++ 0.4.3.143 2015-04-29

I also don't think the check_nrpe plugin is installed on my Nagios server.
Shouldn't it be listed here?

Code: Select all

[root@nagios objects]# cd /usr/local/nagios/libexec/
[root@nagios libexec]# ls
check_apt      check_disk      check_ftp           check_ifstatus  check_mrtg      check_ntp_peer  check_procs    check_spop   check_ups      utils.pm
check_breeze   check_disk_smb  check_game          check_imap      check_mrtgtraf  check_ntp_time  check_real     check_ssh    check_uptime   utils.sh
check_by_ssh   check_dns       check_hpjd          check_ircd      check_nagios    check_nwstat    check_rpc      check_ssmtp  check_users
check_clamd    check_dummy     check_http          check_jabber    check_nntp      check_oracle    check_sensors  check_swap   check_wave
check_cluster  check_file_age  check_icmp          check_load      check_nntps     check_overcr    check_simap    check_tcp    eventhandlers
check_dhcp     check_flexlm    check_ide_smart     check_log       check_nt        check_ping      check_smtp     check_time   negate
check_dig      check_fping     check_ifoperstatus  check_mailq     check_ntp       check_pop       check_snmp     check_udp    urlize

Re: Monitor Disk Usage of Windows Mount Points...

Posted: Mon Aug 24, 2015 12:50 pm
by jasonlehman
I just found the check_nrpe in /usr/lib64/nagios/plugins/

Sorry for the confusion.

Re: Monitor Disk Usage of Windows Mount Points...

Posted: Mon Aug 24, 2015 1:16 pm
by hsmith
jasonlehman wrote:I just found the check_nrpe in /usr/lib64/nagios/plugins/

Sorry for the confusion.
What happens when you try checking now? Did the upgrade fix it?

Re: Monitor Disk Usage of Windows Mount Points...

Posted: Mon Aug 24, 2015 1:32 pm
by jasonlehman
I was just about to post the results.

I can get results running this...

Code: Select all

[root@nagios plugins]# ./check_nrpe -H xxx.xxx.xxx.xxx -c CheckDriveSize
OK All 5 drive(s) are ok|'C:\ used'=37.26652GB;43.99843;49.49823;0;54.99804 'C:\ used %'=67%;79;89;0;100 'E:\ used'=25.4375MB;197.54999;222.24375;0;246.9375 'E:\ used %'=10%;79;89;0;100 'E:\SQL\Logs\ used'=5.08654GB;59.9976;67.4973;0;74.997 'E:\SQL\Logs\ used %'=6%;79;89;0;100 'E:\SQL\TempDatabases\ used'=1.98883GB;27.9976;31.4973;0;34.997 'E:\SQL\TempDatabases\ used %'=5%;79;89;0;100 'E:\SQL\Databases\ used'=74.58734GB;239.9976;269.9973;0;299.997 'E:\SQL\Databases\ used %'=24%;79;89;0;100
I cant get results w/ -a option...

Code: Select all

[root@nagios plugins]# ./check_nrpe -H xxx.xxx.xxx.xxx -c CheckDriveSize -a Drive='E:\SQL\Databases'
Exception processing request: Request contained arguments (not currently allowed, check the allow arguments option).
So now, I need to figure out how to check each mounted volume listed above; is healthy & how much free space is there.
I'm guessing I'll have to add a command in the commands.cfg
and then add a servce definition in my windows.cfg
That's where I'll need some help, please.
Thanks.

Re: Monitor Disk Usage of Windows Mount Points...

Posted: Mon Aug 24, 2015 1:47 pm
by hsmith
jasonlehman wrote:I was just about to post the results.

I can get results running this...

Code: Select all

[root@nagios plugins]# ./check_nrpe -H xxx.xxx.xxx.xxx -c CheckDriveSize
OK All 5 drive(s) are ok|'C:\ used'=37.26652GB;43.99843;49.49823;0;54.99804 'C:\ used %'=67%;79;89;0;100 'E:\ used'=25.4375MB;197.54999;222.24375;0;246.9375 'E:\ used %'=10%;79;89;0;100 'E:\SQL\Logs\ used'=5.08654GB;59.9976;67.4973;0;74.997 'E:\SQL\Logs\ used %'=6%;79;89;0;100 'E:\SQL\TempDatabases\ used'=1.98883GB;27.9976;31.4973;0;34.997 'E:\SQL\TempDatabases\ used %'=5%;79;89;0;100 'E:\SQL\Databases\ used'=74.58734GB;239.9976;269.9973;0;299.997 'E:\SQL\Databases\ used %'=24%;79;89;0;100
I cant get results w/ -a option...

Code: Select all

[root@nagios plugins]# ./check_nrpe -H xxx.xxx.xxx.xxx -c CheckDriveSize -a Drive='E:\SQL\Databases'
Exception processing request: Request contained arguments (not currently allowed, check the allow arguments option).
So now, I need to figure out how to check each mounted volume listed above; is healthy & how much free space is there.
I'm guessing I'll have to add a command in the commands.cfg
and then add a servce definition in my windows.cfg
That's where I'll need some help, please.
Thanks.
How about adding the following somewhere in your nsclient.ini:

Code: Select all

[/settings/NRPE/server]
allow arguments = true

Re: Monitor Disk Usage of Windows Mount Points...

Posted: Mon Aug 24, 2015 2:48 pm
by jasonlehman
I added that to the nsclient.ini & restarted the NSClient++ service.

I then got different results, but not what we wanted. Am I typing in the wrong syntax?

Code: Select all

[root@nagios plugins]# ./check_nrpe -H xxx.xxx.xxx.xxx -c CheckDriveSize -a Drive='E:\SQL\Databases\'
Exception processing request: Request command contained illegal metachars!

Re: Monitor Disk Usage of Windows Mount Points...

Posted: Mon Aug 24, 2015 2:56 pm
by jdalrymple
In the section:

Code: Select all

[/settings/NRPE/server]
add:

Code: Select all

allow nasty characters = true