Page 1 of 2
CheckDriveSize error
Posted: Mon Sep 30, 2013 4:49 am
by veenm
I am monitoring the all drive space check in windows server using check_nrpe , But i am getting the different output.I have attached the output.
Below is the command and service configuration.
define service{
use generic-service,srv-pnp
hostgroup_name xxx
contact_groups admins
process_perf_data 1
service_description All Drive Space
check_command CheckDriveSize!70%!85%
}
define command {
command_name CheckDriveSize
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckDriveSize -a CheckAll MaxWarnUsed=$ARG1$ MaxCritUsed==$ARG2$ FilterType=FIXED
}
There is only 26% and 37% disk space is utilized . But i am getting the critical alert. Please let me know where i am going wrong.
Re: CheckDriveSize error
Posted: Mon Sep 30, 2013 11:16 am
by lmiltchev
How is "CheckDriveSize" command defined on the windows box (NSC.ini or nsclient.ini)?
Re: CheckDriveSize error
Posted: Tue Oct 01, 2013 3:11 am
by veenm
I came to know the problem .
In the command i had put the "==" after "MaxCritUsed"
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckDriveSize -a CheckAll MaxWarnUsed=$ARG1$ MaxCritUsed==$ARG2$ FilterType=FIXED
Re: CheckDriveSize error
Posted: Tue Oct 01, 2013 3:30 am
by veenm
I have one question here.
I want the out put of each drives in separate line . In attached file i can see the C and D drive are coming in single line . Any configuration we can make so that we can see the output in different line .
Re: CheckDriveSize error
Posted: Wed Oct 02, 2013 3:50 am
by gshergill
Hi veenm,
It may be version dependent but you can add "Drive=c:" to the end of the command line, or "Drive=d:".
Code: Select all
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckDriveSize -a CheckAll MaxWarnUsed=$ARG1$ MaxCritUsed==$ARG2$ FilterType=FIXED Drive=c:
Kind Regards,
Gary Shergill
Re: CheckDriveSize error
Posted: Wed Oct 02, 2013 8:57 am
by veenm
Hi Gary,
Thanks for your response . My requirement is drives on the windows server should be auto discovered ( no manually mentioning the drives ) and each drives results should be displayed in nagios as a separate service check as attached . Please let me know is there any solution available .
Re: CheckDriveSize error
Posted: Wed Oct 02, 2013 9:13 am
by slansing
There is no solution to auto discover granular services such as drive checks. Auto discovery derivatives use mostly nmap which will only return the address, and common ports available.
Re: CheckDriveSize error
Posted: Wed Oct 02, 2013 10:22 pm
by veenm
Auto discovery of the drives can be done using " CheckDriveSize" command , but dont want nagios to display all discovered drives check in single service check ( means C: , D: etc drives in one single line , like cehck1.JPEG ) , I want nagios to display as separate service check like check2.bmp . Can we configure like this in nagios ?
Re: CheckDriveSize error
Posted: Thu Oct 03, 2013 12:12 pm
by slansing
Ah I think we are conflicting terms, the way you have the check defined it will check against all of your drives, this is not what we would term as auto discovery as that is a different type of action. However you should be able to use the check command below and define your drives at the end as you have it set right now, by simply removing "CheckAll":
Code: Select all
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckDriveSize -a MaxWarnUsed=$ARG1$ MaxCritUsed==$ARG2$ FilterType=FIXED Drive=c:
You may however want to use a third argument "$ARG3$" for your Drive= section as you are checking multiple drives which will mean multiple services, the way the command is shown above has this hardcoded.
Re: CheckDriveSize error
Posted: Fri Oct 04, 2013 4:36 am
by veenm
our requirement is if we want to configure new window server in nagios then nagios should be able automatically discover the drives on the windows server , do the check against all the drives available in the server and in nagios console we want to see the drives service check separately . here goal that we want to achieve is there should not be a manually mentioning of drives whenever new server configuration comes up.
In your reply i can see that we have to manually mention the drives like C: drive D: drive etc. this we dont want in our configuration .
Any idea , please let me know.