I am using Nagios to monitor Windows hosts. I am using Nagios 3.5 running on a Centos 7 server. The following packages have been installed from the official repositories and from the EPEL repository:
So far I am using the 'check_nt' method to run some basic checks on the windows hosts. This is working fine.
Now I want to use the check_hwinfo plugin to gather information about the hosts in a single place. This plugin requires NRPE in order to run.
In the 'commands.cfg' file I have added:
command_line $USER1$/check_nrpe_hwinfo $HOSTNAME$ $HOSTADDRESS$
In the 'nrpe.cfg' I have added:
command[check_hwinfo_csv]=/usr/bin/sudo /usr/lib64/nagios/plugins/check_hwinfo.pl -t csv
command[check_hwinfo]=c:\windows\system32\cscript.exe //NoLogo //T:10 "C:check_hwinfo\check_hwinfo.wsf"
command[check_hwinfo_csv]=c:\windows\system32\cscript.exe //NoLogo //T:10 "C:\check_hwinfo\check_hwinfo.wsf" /sep:csv
I have copied the 'check_hwinfo.pl' script in the '/usr/lib64/nagios/plugins' folder and made it executable, with identical permissions with the other scripts in the folder.
I have added these lines to '/etc/sudoers' in order to execute without password:
nagios ALL=NOPASSWD: /usr/lib/nagios/plugins/check_hwinfo.pl "", /usr/lib/nagios/plugins/check_hwinfo.pl -t csv
On the client side, I am running NSClient++ on the Windows hosts I am monitoring. For check_hwinfo I made the folder 'C:\check_hwinfo' and put inside the 'check_hwinfo.wsf' file needed for running the test on Windows.
While all the other checks (via check_nt) are working fine, check_hwinfo refuses to work no matter what I try. The service status in the Nagios page is 'WARNING' and the error message is 'No handler for command: check_hwinfo_csv'.
Does anybody have experience with check_hwinfo? Can you please point me in the right direction?
When trying to run check_nrpe manualy I get this:
./check_nrpe -H 192.168.10.13 -c CheckDisk
No handler for command: checkdisk
It is the same as the error message I get at the GUI from the check_hwinfo plugin
No handler for command: check_hwinfo_csv
In the Windows client, in the nsclient-full.ini file I have the following definitions:
check_hwinfo_csv=C:\check_hwinfo\check_hwinfo.wsf -t csv