Monitor Disk
Monitor Disk
I need to be able to monitor disk/drive under disk management but not presented to windows explorer. Is this possible? If I open Disk Management, I can see all the disk but they have not been provisioned for windows under explorer i.e C, D, E drive. I need to be able to monitor those disk using nagios core. Thanks for your help.
Re: Monitor Disk
You would likely require a custom plugin, since all of the plugins for monitoring disk drives under Windows that I'm aware of monitor by drive letter.
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Re: Monitor Disk
Here's my test setup:
As long as the drives have been initialized and a partition exists, you should be able to monitor it using the NSClient++ agent and check_nrpe plugin:
Obviously the volume ID is super ugly and long if we haven't assigned a drive letter to it. If you wanted to check the specific drive that doesn't have a letter assigned, the command gets a little wordy due to neccesary CLI escapes but works:
As long as the drives have been initialized and a partition exists, you should be able to monitor it using the NSClient++ agent and check_nrpe plugin:
Code: Select all
[root@localhost libexec]# /usr/local/nagios/libexec/check_nrpe -H 192.168.67.99 -c check_drivesize -a "filter=type not in ('CDROM', 'REMOVABLE')" "crit=free<1g"
OK All 2 drive(s) are ok|'C:\ free'=29.06156GB;0;0;0;50.23241 'C:\ free %'=57%;0;0;0;100 'C:\ used'=21.17085GB;40.18593;0;0;50.23241 'C:\ used %'=42%;79;0;0;100 '\\?\Volume{9aafe235-7912-11e6-80e0-005056848a3a}\ free'=19.90005GB;0;0;0;19.99706 '\\?\Volume{9aafe235-7912-11e6-80e0-005056848a3a}\ free %'=99%;0;0;0;100 '\\?\Volume{9aafe235-7912-11e6-80e0-005056848a3a}\ used'=0.09701GB;15.99765;0;0;19.99706 '\\?\Volume{9aafe235-7912-11e6-80e0-005056848a3a}\ used %'=0%;79;0;0;100Code: Select all
[root@localhost libexec]# /usr/local/nagios/libexec/check_nrpe -H 192.168.67.99 -c check_drivesize -a "crit=free<1g" "drive=\\\\?\\Volume{9aafe235-7912-11e6-80e0-005056848a3a}\\"
OK All 1 drive(s) are ok|'\\?\Volume{9aafe235-7912-11e6-80e0-005056848a3a}\ free'=19.90005GB;0;0;0;19.99706 '\\?\Volume{9aafe235-7912-11e6-80e0-005056848a3a}\ free %'=99%;0;0;0;100 '\\?\Volume{9aafe235-7912-11e6-80e0-005056848a3a}\ used'=0.09701GB;15.99765;0;0;19.99706 '\\?\Volume{9aafe235-7912-11e6-80e0-005056848a3a}\ used %'=0%;79;0;0;100Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: Monitor Disk
Aw, sweet. I learned something new!
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Re: Monitor Disk
Awesome. Thanks guys, I will set it up tonight and test. If you can leave this open for 24 - 48hrs I will appreciate it. Thanks again.
Re: Monitor Disk
I am getting error message on check_nrpe. I am running version 2.15. Please see attachment. Thanks
Re: Monitor Disk
Changed nsclient installation for nrpe to old legacy and getting this error message now.
- Attachments
-
- Nagios.PNG (5.36 KiB) Viewed 4399 times
Re: Monitor Disk
You will likely need to add/modify the [/settings/NRPE/server] section in your nsclient configuration file to include:
Code: Select all
allow arguments = true
allow nasty characters = true
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: Monitor Disk
thanks. that fixed that error. I setup command to use and its not showing critical like I want it. I want it to not alert on warning. It is showing warning instead of only critical. On picture 3 - I changed the critical argument to 30%, it showed critical and System Reserved. How can I omit that too. Thanks for all the help.
define service{
use generic-service
hostname CWWAPP993
service_description Disk Management Drive
check_command check_nrpe_diskmanagement
}
define command{
command_name check_nrpe_diskmanagement
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_drivesize -a "filter=type not in ('CDROM','REMOVABLE')" "critical=free<10%" drive=*
}
define service{
use generic-service
hostname CWWAPP993
service_description Disk Management Drive
check_command check_nrpe_diskmanagement
}
define command{
command_name check_nrpe_diskmanagement
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_drivesize -a "filter=type not in ('CDROM','REMOVABLE')" "critical=free<10%" drive=*
}
Re: Monitor Disk
Hello. Thanks for your help. this can be closed. Fix below for future reference.
define command{
command_name check_nrpe_diskmanagement
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_drivesize -a "filter=type not in ('CDROM','REMOVABLE')" "critical=free<10%" "warning=used>85%" drive=*
define command{
command_name check_nrpe_diskmanagement
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_drivesize -a "filter=type not in ('CDROM','REMOVABLE')" "critical=free<10%" "warning=used>85%" drive=*