NSClient - ERROR: Invalid return from command: check_drivesi
Posted: Thu Oct 08, 2015 5:18 pm
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
Host entry:
Command:
Service for C drive:
Service for E Drive:
hostgroup details:
Return when I run from command line:
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.
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) 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
}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
}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
}Code: Select all
define hostgroup {
hostgroup_name windows-servers
alias Windows Servers
members Server1,Server2,Server3,Server4,Server5,QA-Test01
}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_drivesizeAnyone 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.