NSClient++ Help (#1) - NSCP returns "no handler for that command" only if check is not ok (#651) - Message List

NSCP returns "no handler for that command" only if check is not ok

I have a backup job that creates an archive for each day in a certain directory. My end goal is to be able to create a check to make sure that the most recent file matching the pattern is no more than 24 hours old.

I currently have the following command for a different check which works find, which would indicate that CheckFile2 at least in this instance works correctly:

alias_deltacopy_age=checkFile2 filter=out "file=C:\Directory\file_log" filter-written=>7d MaxCrit=1 "syntax=%filename% %write%"

When I started having trouble with my new one, I picked a random log file in C:\ to eliminate any path-related problems. I have a file C:\debug.log created several months ago. If I use the following for the alias:

alias_svn_daily_age=checkFile2 filter=out path=C:\ pattern=*.log filter-written=>365d MaxCrit=1 "syntax=%filename% was created %write%"

I get the following response: CheckFile ok|'found files'=0;0;1;

However, if I change the filter-written to 5d:

alias_svn_daily_age=checkFile2 filter=out path=C:\ pattern=*.log filter-written=>5d MaxCrit=1 "syntax=%filename% %write%"

I get: UNKNOWN: No handler for that command

To further narrow down the problem, I tried to use syntax nearly identical to my pre-existing "working" check:

alias_svn_daily_age=checkFile2 filter=out "file=C:\startup_debug.log" filter-written=>365d MaxCrit=1 "syntax=%filename% was created %write%"

returns the expected result:

CheckFile ok|'found files'=0;0;1;

and the check that SHOULDN'T come back as "OK":

alias_svn_daily_age=checkFile2 filter=out "file=C:\debug.log" filter-written=>5d MaxCrit=1 "syntax=%filename% was created %write%"

also works: debug.log was created Tuesday, December 08, 2009 21:09:42, found files: 1 > critical|'found files'=1;0;1;

Am I doing something incorrect with my Path syntax?

Subscriptions