NSClient - ERROR: Invalid return from command: check_drivesi

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.
Locked
JDAIII
Posts: 2
Joined: Thu Oct 08, 2015 4:56 pm

NSClient - ERROR: Invalid return from command: check_drivesi

Post by JDAIII »

So I've set up a nagios server on my network. I have set one windows server to report the hdd info for both the C and E drives. C works without issue, but E does not. I have verified that there is an E drive on this machine. The only difference is that this machine has a firewall on since it is reachable externally. The other servers have no firewall. But would not the C fail if it were a firewall issue? This is work, so I have to obscure all the ip addresses and server names, sorry.

From Nagios UI

Code: Select all

QA-Test01 - Windows Server
C:\ Drive Space: OK	2015-10-08 14:54:52	0d 2h 15m 50s	1/3	C: - total: 500.00 Gb - used: 133.32 Gb (27%) - free 366.68 Gb (73%) 
CPU Load: OK	2015-10-08 14:50:22	0d 2h 23m 51s	1/3	CPU Load 16% (5 min average) 
E:\ Drive Space: UNKNOWN	2015-10-08 14:53:04	0d 2h 18m 55s	1/3	NSClient - ERROR: Invalid return from command: check_drivesize 
Memory Usage: OK	2015-10-08 14:50:46	0d 2h 20m 36s	1/3	Memory usage: total:37507.27 Mb - used: 15737.41 Mb (42%) - free: 21769.86 Mb (58%) 
NSClient++ Version: OK	2015-10-08 14:53:04	0d 2h 18m 59s	1/3	NSClient++ 0.4.3.143 2015-04-29 
Uptime: OK	2015-10-08 14:54:52	0d 2h 17m 21s	1/3	System Uptime - 7 day(s) 2 hour(s) 34 minute(s) 
Host entry:

Code: Select all

define host {
                host_name                             QA-Test01
                alias                                 QA-Test01
                address                               [i]obfiscated[/i]
                icon_image_alt                        Windows Server
                icon_image                            base/win40.gif
                statusmap_image                       base/win40.gd2
                check_command                         check-host-alive
                use                                   windows-server
                contact_groups                        admins, sys-admins
}
Command:

Code: Select all

define command {
                command_name            check_ntdsk
                command_line            $USER1$/check_nt -H '$HOSTADDRESS$' -p  12489 -s pass123 -v '$ARG1$' -l '$ARG2$' -w 80 -c 90
}

Service for C drive:

Code: Select all

define service {
                service_description                   C:\ Drive Space
                check_command                         check_ntdsk!USEDDISKSPACE!C
                hostgroup_name                        windows-servers,performance-servers
                use                                   generic-service
                contact_groups                        admins,sys-admins
}
Service for E Drive:

Code: Select all

define service {
                service_description                     E:\ Drive Space
                check_command                           check_ntdsk!USEDDISKSPACE!E
                host_name                               server1,server2,QA-Test01
                use                                     generic-service
                contact_groups                          admins,sys-admins
}
hostgroup details:

Code: Select all

define hostgroup {
                hostgroup_name                        windows-servers
                alias                                 Windows Servers
                members                               Server1,Server2,Server3,Server4,Server5,QA-Test01

}
Return when I run from command line:

Code: Select all

pi@NagiosPi /usr/lib/nagios/plugins $ ./check_nt -H 'ipofQA-Test01' -p 12489 -s pass123 -v 'USEDDISKSPACE' -l 'C' -w 80 -c 90
C:\ - total: 500.00 Gb - used: 133.32 Gb (27%) - free 366.68 Gb (73%) | 'C:\ Used Space'=133.32Gb;400.00;450.00;0.00;500.00
pi@NagiosPi /usr/lib/nagios/plugins $ ./check_nt -H 'ipofQA-Test01' -p 12489 -s pass123 -v 'USEDDISKSPACE' -l 'E' -w 80 -c 90
NSClient - ERROR: Invalid return from command: check_drivesize

Anyone got any clue why it works on one drive and not the other? I just built this server two weeks ago and I'm pretty sure I didn't make any changes from servers1 & 2 where the E drive works. I also have servers with D drive that are fine and F drive, all with the same command. Only difference I can think of is that this server has windows server 2012 R2 and has a firewall up. I thought that it could be the version of NSClient++ on that server since most of the other servers run on NSClient++ 4.1, however I see another windows server working on the F and C drives with NSClient++ 0.4.3.143 2015-04-29.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: NSClient - ERROR: Invalid return from command: check_dri

Post by hsmith »

Is the E drive a network drive? I've also seen this error be related to permissions on the drive.
Former Nagios Employee.
me.
JDAIII
Posts: 2
Joined: Thu Oct 08, 2015 4:56 pm

Re: NSClient - ERROR: Invalid return from command: check_dri

Post by JDAIII »

It's not a network drive, but it IS an issue with the drive. This is a non issue. I'm marking as answered.

What I found in server 2012 R2 is that the E drive shows up in file explorer, but it 0bytes and in server manager, the storage device has errors. This is a hardware malfunction and not a nagios issue.

Sorry to have wasted people's time. The drive showed as accessible and I copied over 1TB of data to it, then configured nagios. Must have failed between those events.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: NSClient - ERROR: Invalid return from command: check_dri

Post by hsmith »

I am happy to hear Nagios is working out all right for you. I am not happy to hear that your drive failed :(

I'll lock this one up.

Let us know if you need anything else. Thanks!
Former Nagios Employee.
me.
Locked