Page 5 of 5

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

Posted: Wed Aug 26, 2015 1:05 pm
by hsmith
jasonlehman wrote:No worries.
Unfortunately, that didn't work either.
Getting...
Filter processing failed: Error: Failed to get size for: 3: The system cannot find the path specified.

Here is what I have

Code: Select all

#windows Mount Point for SQL Databases on host1
define service {
        host_name                       host1
        service_description             SQL DB Disk
        use                             generic-service
        check_command                   check_mp!CheckDriveSize!Drive=E:\SQL\Databases MinCritFree=10% MinWarnFree=15%!!!!!!
        check_period                    24x7
        register                        1
        }
I managed to reproduce this one. I'll see what I did wrong and post back here in a few minutes.

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

Posted: Wed Aug 26, 2015 1:43 pm
by hsmith
hsmith wrote:
jasonlehman wrote:No worries.
Unfortunately, that didn't work either.
Getting...
Filter processing failed: Error: Failed to get size for: 3: The system cannot find the path specified.

Here is what I have

Code: Select all

#windows Mount Point for SQL Databases on host1
define service {
        host_name                       host1
        service_description             SQL DB Disk
        use                             generic-service
        check_command                   check_mp!CheckDriveSize!Drive=E:\SQL\Databases MinCritFree=10% MinWarnFree=15%!!!!!!
        check_period                    24x7
        register                        1
        }
I managed to reproduce this one. I'll see what I did wrong and post back here in a few minutes.
My core machine has a few issues. Anyway, something that seemed to have worked for me in XI (which uses core under the hood) is making two more arguments. I'll post some examples while I try to fix my core box (was doing some really silly testing on it yesterday)

Code: Select all

# 'check_mp' command the community helped me make to check Windows Mount Points via check_nrpe
define command {
       command_name     check_mp
       command_line     $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a '$ARG2$' '$ARG3' '$ARG4'
}

Code: Select all

#windows Mount Point for SQL Databases on host1
define service {
        host_name                       host1
        service_description             SQL DB Disk
        use                             generic-service
        check_command                   check_mp!CheckDriveSize!Drive=E:\SQL\Databases!MinCritFree=10!MinWarnFree=15!!!!
        check_period                    24x7
        register                        1
        }
Also took the %'s out for good measure, doesn't seem to need them. You can try this while I am working on my core machine.

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

Posted: Wed Aug 26, 2015 2:03 pm
by hsmith
Core machine fixed. Command working, cfg file here:

Code: Select all

# 'check_mp' command the community helped me make to check Windows Mount Points via check_nrpe
define command {
       command_name     check_mp
       command_line     $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a '$ARG2$' '$ARG3$' '$ARG4$'
}

#windows Mount Point for SQL Databases on host1
define service {
        host_name                       x.x.x.x
        service_description             SQL DB Disk
        use                             generic-service
        check_command                   check_mp!CheckDriveSize!D:\Fedora!MinCritFree=20%!MinWarnFree=15%!!!!
        check_period                    24x7
        register                        1
        }

define host{
        host_name                      x.x.x.x
        use                             linux-server     <------ It is not really a linux server, I just didn't have much else configured.  Please don't copy / paste this part :P 
        address                         x.x.x.x
        }


~
~

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

Posted: Wed Aug 26, 2015 2:18 pm
by jasonlehman
hsmith wrote:Core machine fixed. Command working, cfg file here:

Code: Select all

# 'check_mp' command the community helped me make to check Windows Mount Points via check_nrpe
define command {
       command_name     check_mp
       command_line     $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a '$ARG2$' '$ARG3$' '$ARG4$'
}

#windows Mount Point for SQL Databases on host1
define service {
        host_name                       x.x.x.x
        service_description             SQL DB Disk
        use                             generic-service
        check_command                   check_mp!CheckDriveSize!D:\Fedora!MinCritFree=20%!MinWarnFree=15%!!!!
        check_period                    24x7
        register                        1
        }

define host{
        host_name                      x.x.x.x
        use                             linux-server     <------ It is not really a linux server, I just didn't have much else configured.  Please don't copy / paste this part :P 
        address                         x.x.x.x
        }


~
~
After these changes, Its back to...
OK All 1 drive(s) are ok

Im not sure how to verify its working w/out the disk hitting the value limits. I guess I could change the MinWarnFree to something crazy like 90%.
I'll do that, hold on.

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

Posted: Wed Aug 26, 2015 2:20 pm
by hsmith
jasonlehman wrote:
hsmith wrote:Core machine fixed. Command working, cfg file here:

Code: Select all

# 'check_mp' command the community helped me make to check Windows Mount Points via check_nrpe
define command {
       command_name     check_mp
       command_line     $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a '$ARG2$' '$ARG3$' '$ARG4$'
}

#windows Mount Point for SQL Databases on host1
define service {
        host_name                       x.x.x.x
        service_description             SQL DB Disk
        use                             generic-service
        check_command                   check_mp!CheckDriveSize!D:\Fedora!MinCritFree=20%!MinWarnFree=15%!!!!
        check_period                    24x7
        register                        1
        }

define host{
        host_name                      x.x.x.x
        use                             linux-server     <------ It is not really a linux server, I just didn't have much else configured.  Please don't copy / paste this part :P 
        address                         x.x.x.x
        }


~
~
After these changes, Its back to...
OK All 1 drive(s) are ok

Im not sure how to verify its working w/out the disk hitting the value limits. I guess I could change the MinWarnFree to something crazy like 90%.
I'll do that, hold on.
That is exactly how I tested it! :D

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

Posted: Wed Aug 26, 2015 2:23 pm
by jasonlehman
The test worked! Thank you so much for helping me. I just wish I knew more about Nagios; I feel helpless sometimes. I keep trying to learn more.

Here are the results of the test...
The service turned yellow on the Nagios dashboard w/ this message...
WARNING E:SQLDatabases: Total: 299.997GB - Used: 100.944GB (34%) - Free: 199.053GB (66%)

I'll change the warning back to 15% freespace

I will my post my final configs & notes for anyone that comes across this post.

Thanks again

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

Posted: Wed Aug 26, 2015 2:30 pm
by hsmith
jasonlehman wrote:The test worked! Thank you so much for helping me. I just wish I knew more about Nagios; I feel helpless sometimes. I keep trying to learn more.

Here are the results of the test...
The service turned yellow on the Nagios dashboard w/ this message...
WARNING E:SQLDatabases: Total: 299.997GB - Used: 100.944GB (34%) - Free: 199.053GB (66%)

I'll change the warning back to 15% freespace

I will my post my final configs & notes for anyone that comes across this post.

Thanks again
I know how you feel, try being the new guy surrounded by super smart people! :P I'm glad we could get this one working for you though, sorry for the misinformation in some spots, sometimes stuff doesn't happen exactly how you think it should. I'll lock this one up and mark it resolved after you post your stuff. Thank you for the patience.

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

Posted: Wed Aug 26, 2015 2:47 pm
by jasonlehman
hsmith wrote:
jasonlehman wrote:The test worked! Thank you so much for helping me. I just wish I knew more about Nagios; I feel helpless sometimes. I keep trying to learn more.

Here are the results of the test...
The service turned yellow on the Nagios dashboard w/ this message...
WARNING E:SQLDatabases: Total: 299.997GB - Used: 100.944GB (34%) - Free: 199.053GB (66%)

I'll change the warning back to 15% freespace

I will my post my final configs & notes for anyone that comes across this post.

Thanks again
I know how you feel, try being the new guy surrounded by super smart people! :P I'm glad we could get this one working for you though, sorry for the misinformation in some spots, sometimes stuff doesn't happen exactly how you think it should. I'll lock this one up and mark it resolved after you post your stuff. Thank you for the patience.
No need to apologize, you did a great job! Funny how we both thought to set that value to 90% to test.
Thanks again, my next post will by my final notes.

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

Posted: Wed Aug 26, 2015 3:09 pm
by hsmith
jasonlehman wrote:
hsmith wrote:
jasonlehman wrote:The test worked! Thank you so much for helping me. I just wish I knew more about Nagios; I feel helpless sometimes. I keep trying to learn more.

Here are the results of the test...
The service turned yellow on the Nagios dashboard w/ this message...
WARNING E:SQLDatabases: Total: 299.997GB - Used: 100.944GB (34%) - Free: 199.053GB (66%)

I'll change the warning back to 15% freespace

I will my post my final configs & notes for anyone that comes across this post.

Thanks again
I know how you feel, try being the new guy surrounded by super smart people! :P I'm glad we could get this one working for you though, sorry for the misinformation in some spots, sometimes stuff doesn't happen exactly how you think it should. I'll lock this one up and mark it resolved after you post your stuff. Thank you for the patience.
No need to apologize, you did a great job! Funny how we both thought to set that value to 90% to test.
Thanks again, my next post will by my final notes.
Sounds good, glad to help :)

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

Posted: Wed Aug 26, 2015 3:21 pm
by jasonlehman
Thanks so much to this support forum & especially member hsmith

Here are my final notes that I had to follow to get this to work...

1. Make sure the version of the NSClient++ for Windows was at least 0.4.2.x
I had an older version running & ended up putting on 0.4.3.143, that was latest stable as of this writing.
During installation, I had to set NRPE Server to insecure mode; I would get an SSL authentication error otherwise

2. Modify the nsclient.ini file on the Windows host...
In the section [/settings/NRPE/server]
add the following lines
allow arguments = true
allow nasty characters = true

3. I had to copy my check_nrpe plugin into /usr/local/nagios/libexec
My check_nrpe plugin was installed to a different location

Here are the final configs...

Command...

Code: Select all

# 'check_mp' command the community helped me make to check Windows Mount Points via check_nrpe
define command {
       command_name     check_mp
       command_line     $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a '$ARG2$' '$ARG3$' '$ARG4$'
}

Service...

Code: Select all

#windows Mount Point for SQL Databases on SQL servers
define service {
        host_name                       host1
        service_description             SQL DB Disk
        use                             generic-service
        check_command                   check_mp!CheckDriveSize!E:\SQL\Databases!MinCritFree=10%!MinWarnFree=15%!!!!
        check_period                    24x7
        register                        1
        }
To test if the critical and/or warning checks are working, set the value high temporarily; like 90% :D