Monitor Disk Usage of Windows Mount Points...

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

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

Post by hsmith »

jasonlehman wrote:
hsmith wrote:The reason that your command is failing is because...

Code: Select all

define command {
       command_name                             check_mp
       command_line                             $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$
}
Inside of here $USER1$ is pointing at /usr/local/nagios/libexec since it is defined in resource.cfg as pointing at that.

You need to either move check_nrpe or change the command_line part of the command.

Make sense?
Make's perfect sense. I changed the command_line to point to the correct path; which is for me /usr/lib64/nagios/plugins/
I'm not sure why mine is different.

I now need to understand how to put in the correct path to the mount point in the check_command.
Using what was suggested... check_mp!CheckDriveSize!E:\SQL\Databases!!!!!!

I now get this result from Nagios...
Filter processing failed: Error: Failed to get size for: 3: The system cannot find the path specified.

Do I really need 6 exclamation points after my path? I'm not sure why there are so many.
Thanks
I wouldn't touch the exclamation points. Instead, what I would try to do is move/copy your check_nrpe over to /usr/local/nagios/libexec and put $USER1$ back in place instead of the file path. We could be running into some weird issue with having a path there instead of $USER1$.

Try this and let me know, thanks!
Former Nagios Employee.
me.
jasonlehman
Posts: 31
Joined: Wed Jul 29, 2015 7:59 am

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

Post by jasonlehman »

hsmith wrote:
jasonlehman wrote:
hsmith wrote:The reason that your command is failing is because...

Code: Select all

define command {
       command_name                             check_mp
       command_line                             $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$
}
Inside of here $USER1$ is pointing at /usr/local/nagios/libexec since it is defined in resource.cfg as pointing at that.

You need to either move check_nrpe or change the command_line part of the command.

Make sense?
Make's perfect sense. I changed the command_line to point to the correct path; which is for me /usr/lib64/nagios/plugins/
I'm not sure why mine is different.

I now need to understand how to put in the correct path to the mount point in the check_command.
Using what was suggested... check_mp!CheckDriveSize!E:\SQL\Databases!!!!!!

I now get this result from Nagios...
Filter processing failed: Error: Failed to get size for: 3: The system cannot find the path specified.

Do I really need 6 exclamation points after my path? I'm not sure why there are so many.
Thanks
I wouldn't touch the exclamation points. Instead, what I would try to do is move/copy your check_nrpe over to /usr/local/nagios/libexec and put $USER1$ back in place instead of the file path. We could be running into some weird issue with having a path there instead of $USER1$.

Try this and let me know, thanks!
Ok, so I copied my check_nrpe to /usr/local/nagios/libexec/
So it's now in two locations

Code: Select all

[root@nagios objects]# find / -name check_nrpe
/usr/lib64/nagios/plugins/check_nrpe
/usr/local/nagios/libexec/check_nrpe
Modified the command back to use $USER1$/check_nrpe

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$
}
I then restarted the Nagios service.
Unfortunately, I still get the message...
Filter processing failed: Error: Failed to get size for: 3: The system cannot find the path specified.

BTW here is the service

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!E:\SQL\Databases!!!!!!
        check_period                    24x7
        register                        1
        }
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

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

Post by hsmith »

Hmm... let's put that $ARG2$ in quotes. '$ARG2'
Former Nagios Employee.
me.
jasonlehman
Posts: 31
Joined: Wed Jul 29, 2015 7:59 am

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

Post by jasonlehman »

hsmith wrote:Hmm... let's put that $ARG2$ in quotes. '$ARG2'
That worked, now I get the result of...

OK All 1 drive(s) are ok

Thank you

What does it me by all drives are ok? Will this alert me if the drive starts to get full, like the check_nt!USEDDISKSPACE! will alert at warning & critical values?
If so, is there a way to set the warning & critical values?
Thanks
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

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

Post by hsmith »

jasonlehman wrote:
hsmith wrote:Hmm... let's put that $ARG2$ in quotes. '$ARG2'
That worked, now I get the result of...

OK All 1 drive(s) are ok

Thank you

What does it me by all drives are ok? Will this alert me if the drive starts to get full, like the check_nt!USEDDISKSPACE! will alert at warning & critical values?
If so, is there a way to set the warning & critical values?
Thanks
./check_nrpe -H x.x.x.x-c CheckDriveSize -a Drive=D: MinCritFree=20% MinWarnFree=30%

Is the command I used for this. MinWarnFree is the minimum amount free before it warns you, MinCritFree is the amount before it goes critical. You can modify your service check to include these.
Former Nagios Employee.
me.
jasonlehman
Posts: 31
Joined: Wed Jul 29, 2015 7:59 am

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

Post by jasonlehman »

Would I just add MinCritFree=20% MinWarnFree=30% to the service is setup?

I tried a few different ways, but dont get any different results.

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!E:\SQL\Databases!!!!!!-a MinCritFree=10% MinWarnFree=15%
        check_period                    24x7
        register                        1
        }
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

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

Post by hsmith »

jasonlehman wrote:Would I just add MinCritFree=20% MinWarnFree=30% to the service is setup?

I tried a few different ways, but dont get any different results.

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!E:\SQL\Databases!!!!!!-a MinCritFree=10% MinWarnFree=15%
        check_period                    24x7
        register                        1
        }
Close. Add it after the Databases portion. Like so:

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!E:\SQL\Databases MinCritFree=10% MinWarnFree=15%!!!!!!
        check_period                    24x7
        register                        1
        }
And try.
Former Nagios Employee.
me.
jasonlehman
Posts: 31
Joined: Wed Jul 29, 2015 7:59 am

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

Post by jasonlehman »

I'm back to the error...
Filter processing failed: Error: Failed to get size for: 3: The system cannot find the path specified.

When I put it in the exclamation points...

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!E:\SQL\Databases MinCritFree=10% MinWarnFree=15%!!!!!!
        check_period                    24x7
        register                        1
        }
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

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

Post by hsmith »

jasonlehman wrote:I'm back to the error...
Filter processing failed: Error: Failed to get size for: 3: The system cannot find the path specified.

When I put it in the exclamation points...

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!E:\SQL\Databases MinCritFree=10% MinWarnFree=15%!!!!!!
        check_period                    24x7
        register                        1
        }
There needs to be a Drive= there, I may have screwed that one up. :(

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
        }
Former Nagios Employee.
me.
jasonlehman
Posts: 31
Joined: Wed Jul 29, 2015 7:59 am

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

Post by jasonlehman »

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
        }
Locked