check_fileage: no handler for command.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Unigarant
Posts: 42
Joined: Mon Jan 06, 2014 2:53 am

check_fileage: no handler for command.

Post by Unigarant »

Hi, I am having some trouble getting a fileage check to work in NagiosXI.
After copying the .vbs to the remote host I get the correct output if I just click on it.

When I test the command (I just created) in Nagios I get: No handler for command: check_fileage.
I have added the command to the local NSClient.ini:

Code: Select all

[/settings/external scripts/wrapped scripts]

check_provisioning = vmview-dpstatus.ps1

check_fileage = cscript.exe //nologo //T:30 check_fileage.vbs $ARG1$ $ARG2$ $ARG3$

check_dhcp_scope = check_dhcp.vbs

check_db01 = mountpoint.ps1 -path A:\SomeDrive\

; A list of templates for wrapped scripts
[/settings/external scripts/wrappings]

; BATCH FILE WRAPPING - 
bat = scripts\\%SCRIPT% %ARGS%

; POWERSHELL WRAPPING - 
ps1 = cmd /c echo scripts\\%SCRIPT% %ARGS%; exit($lastexitcode) | powershell.exe -command -

; VISUAL BASIC WRAPPING - 
vbs = cscript.exe //T:30 //NoLogo scripts\\lib\\wrapper.vbs %SCRIPT% %ARGS%
Can anyone point me in the right direction for this?

Any other "file age check on a Windows host for dummies" is also fine, except the ones involving a WMI query.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: check_fileage: no handler for command.

Post by lmiltchev »

I believe you will need to move the command definition from the [/settings/external scripts/wrapped scripts] section to the [/settings/external scripts/scripts] section. Also, make sure the external scripts and nrpe modules are enabled, and that you allow arguments under the "external scripts" and "nrpe" sections (allow arguments = 1). Save, exit and restart NSClient++ service. If you keep getting the "no handler for command" error, please post the entire "nsclient.ini" file. Hide sensitive info.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked