Hi everyone -
I'm trying to set up check_file to verify dates on backups.
(For those not familiar with it, "check_file.exe" is an NRPE plugin for Windows
Nagios is 3.X, running on Centos 5.3
check_file.exe is running on a Windows 2003 server,
which has NSClient++ installed.
(NSClient++ is my preferred Windows solution for Nagios integration, over SNMP or anything older)
I have a check_file command built on the Win2003 server
"c:\nagiosplugins\check_file\check_file.exe -t "d:\backups\" --filter "name match *.*" --filter "age ge -24 hours" --critical 0"
That works fine - returns the required
"FILE OK - 0 files out of 22 to consider"
I have uncommented
From NSClient.INI, under section NRPE Handlers, I don't understand this at all:
";command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10"
So I tried to use the NRPE handlers variant of "simple"
thusly, my NSClient.INI contains the line
which I think of as being an "alias" for check_file and all the parameters I'm giving it.
I have tried this command on the Centos Nagios server
"/usr/local/nagios/libexec/check_nrpe -n -H -c ccmbackup"
That gives me "CHECK_NRPE: Error receiving data from daemon." on the Centos server
The batch file runs fine on Windows - gives the correct output for a current backup, gives critical errors if files don't exist or are older than 24 hours.
I know this is some misunderstanding I have about how to "call" the check_file batch file
(or direct script) from NRPE...
What am I doing wrong?
Other checks are running fine on this server (ping, mem use, uptime, etc) as configured in NSClient.INI and services in the hosts file
So it's not a global problem with NSClient
NSClient++ in test mode looks OK:
"Launching test mode...
d \NSClient++.cpp(401) Loading plugin: CheckDisk...
d \NSClient++.cpp(401) Loading plugin: CheckSystem...
d \CheckSystem.cpp(79) Autodetected W2K>, using TOOLHELP process enumeration.
d \PDHCollector.cpp(65) Autodetected w2k or later, using w2k PDH counters.
d \NSClient++.cpp(401) Loading plugin: CheckWMI...
d \PDHCollector.cpp(102) Using index to retrive counternames
d \NSClient++.cpp(401) Loading plugin: NRPE server...
d \PDHCollector.cpp(122) Found countername: CPU: \Processor(_total)\% Process
d \PDHCollector.cpp(123) Found countername: UPTIME: \System\System Up Time
d \PDHCollector.cpp(124) Found countername: MCL: \Memory\Commit Limit
d \PDHCollector.cpp(125) Found countername: MCB: \Memory\Committed Bytes
d \NSClient++.cpp(401) Loading plugin: NSClient server...
d \NSClient++.cpp(401) Loading plugin: SystemTray...
e \SysTray.cpp(40) SysTray is not installed (or it cannot interact with the desk
top) SysTray won't be loaded. Run NSClient++ SysTray install to change this.
d \Socket.h(627) Bound to: 192.168.0.9:5666
d \Socket.h(627) Bound to: 192.168.0.9:12489
l \NSClient++.cpp(136) Using settings from: INI-file
l \NSClient++.cpp(137) Enter command to inject or exit to terminate...
d \NSClientListener.cpp(143) Data: nagioscheckscoa&7
d \NSClientListener.cpp(168) Data:
d \NSClient++.cpp(516) Injecting: checkMem: nsclient
d \NSClient++.cpp(536) Injected Result: OK '6263549952&1847824384'
d \NSClient++.cpp(537) Injected Performance Result: ''