CheckDriveSize error

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.
veenm
Posts: 148
Joined: Tue Jun 18, 2013 5:58 am

CheckDriveSize error

Post 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.
Attachments
status.JPG
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: CheckDriveSize error

Post by lmiltchev »

How is "CheckDriveSize" command defined on the windows box (NSC.ini or nsclient.ini)?
Be sure to check out our Knowledgebase for helpful articles and solutions!
veenm
Posts: 148
Joined: Tue Jun 18, 2013 5:58 am

Re: CheckDriveSize error

Post 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
veenm
Posts: 148
Joined: Tue Jun 18, 2013 5:58 am

Re: CheckDriveSize error

Post 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 .
Attachments
status.JPG
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Re: CheckDriveSize error

Post 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
veenm
Posts: 148
Joined: Tue Jun 18, 2013 5:58 am

Re: CheckDriveSize error

Post 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 .
Attachments
drives.jpg
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: CheckDriveSize error

Post 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.
veenm
Posts: 148
Joined: Tue Jun 18, 2013 5:58 am

Re: CheckDriveSize error

Post 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 ?
Attachments
check2.JPG
check1.JPG
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: CheckDriveSize error

Post 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.
veenm
Posts: 148
Joined: Tue Jun 18, 2013 5:58 am

Re: CheckDriveSize error

Post 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.
Locked