I am running Nagios 3.5 on a Centos 7 machine. The setup is used to monitor some Windows machines via NRPE (check_nrpe commands). For the time being I am using the preconfigured ‘alias’ commands that come in the ‘nsclient-full.ini’ file. Everything is working fine so far.
I want to monitor the state of the Windows Updates on my hosts, using the ‘alias_updates’ command.
; alias_updates - Alias for alias_updates.
alias_updates = check_updates -warning 0 -critical 0 ShowAll=long
Here is the section where all external scripts are defined:
; A list of scripts available to run from the CheckExternalScripts module.
[/settings/external scripts/scripts]
check_updates=C:\Program Files\NSClient++\scripts\check_updates.vbs
Of course I have checked that ‘check_updates.vbs’ exists in the path I provided. After all, it came bundled with NSClient++.
I have enabled the execution of external scripts:
; Check External Scripts - A simple wrapper to run external scripts and batch files.
CheckExternalScripts = 1
The other relevant configuration options (in my opinion) are:
` ; Section for NRPE (NRPEServer.dll) (check_nrpe) protocol options.
[/settings/NRPE/server]
; COMMAND ARGUMENT PROCESSING
allow arguments = true
; COMMAND ALLOW NASTY META CHARS
allow nasty characters = false
; PORT NUMBER – Port to use for NRPE.
port = 5666
; Section for external scripts configuration options (CheckExternalScripts).
[/settings/external scripts]
; COMMAND ARGUMENT PROCESSING
allow arguments = true
; COMMAND ALLOW NASTY META CHARS
allow nasty characters = false
; SCRIPT DIRECTORY
script path =
; COMMAND TIMEOUT
timeout = 60
On the Nagios server, from the command prompt, I am trying this:
<code>[root@mama365-account plugins]# ./check_nrpe -H 192.168.10.13 -c alias_updates</code>
The response I am getting is this:
ExternalCommands: failed to create process (C:\Program Files\NSClient++\scripts\check_updates.vbs): it is not an exe file (check NSC.log for more info) – failed to lookup error code: 193( reson: 87)
`
I understand that NSClient can run plugins that are not executable (*.exe), but merely scripts. And this one is a VB script. Also, the same error message is displayed in the Nagios GUI, in the box corresponding with the command.
Anyone has any idea how to fix this? Reading the docs for NSClient++ has only brought me so far…