NSClient++ Help (#1) - calling CheckFiles through nrpe (#932) - Message List
Hello
I upgraded to latest stable version of NSclient++ 0.3.9.327 32bit. Nsclient++ works fine for previosly defined services. Now I'm trying to define new service for checking existence of files in directory.
Every my attemps failed with parsing errors, even examples from this site.
When I send parameters starting with string path I get errors, which appears, that nrpe passed no arguments.
check_nrpe -H host -p 5666 -c CheckFiles -a path=D:\tmp "pattern=*.exe" "syntax=%filename%: %version%" MaxWarn=1 Parsing failed:
2012-03-20 08:47:54: error:d:\source\nscp\branches\stable\include\parsers/filter/where_filter_impl.hpp:85: Parsing failed of at:
When I change string path to something else I get error. Unknown argument: something_else
Does anybody have idea, where I have error in calling CheckFiles through nrpe?
Thanks Martin
-
Message #2453
Humm, not sure if you can have empty filters actually :)
I need to check, I have not thought about that scenario actually...
Michael Medin
mickem03/20/12 14:03:45 (15 months ago)-
Message #2454
I have to implement several scenarios.
First simple is, that no files must be in directory. Only exception files go to this directory and operator must manually resolve them. I want to only count files without filtering and alert operator when any files appears.
Second scenario count only files older than x minutes. Even though I write
check_nrpe -H host -p 5666 -c CheckFiles -a path=D:\tmp "pattern=*.exe" "filter=create < -2d" MaxWarn=1
I always get error Parsing failed:
Martin
pozdilek03/20/12 14:12:50 (15 months ago)-
Message #2455
I vaugly recall create being called created (notice the d) but I am unsure,. I shall check and perhaps add both so there is less confusion...
Try something simple like: "filter=size gt 0"
Michael Medin
mickem03/20/12 15:21:02 (15 months ago)-
Message #2456
Any filter must be included, otherwise error about parsing is return. Accurate error message about missing parameter will be better.
The main my problem probable was windows path delimiter \. The path must be doubleslashed and musn't end with \. \ can be replaced with /.
The correct filter for monitoring creation time is creation and not create or created as is written in documentation.
./check_nrpe -H hostname -p 5666 -c CheckFiles -a path=D:\ \TMP "pattern=*.*" "filter=creation gt -10m" MaxWarn=1 MaxCrit=1
Probably performance part of return string contains useless apostrophe '.
CheckFile ok|'found files'=0;1;1
Thanks for advice.
Martin
pozdilek03/20/12 16:15:49 (15 months ago)-
Message #2862
One "Workaround" might be:
check_nrpe -H 127.0.0.1 -c CheckFiles -a path="C:\\temp\\2 1 3" pattern=*.* "filter=size gt 1b and written lt -30m" "syntax=%filename%: %size%" MaxWarn=1 MaxCrit=2
But it would be nice to skip pattern or tell pattern that im concerned about the contents of the directory and i dont care about "." and ".." Just the files inside if they are newer/older then xyz.
Example a pdf server service, which have files during the time it takes to convert/print but normally it should be empty or not have files older then 30min. And the only way to know if it has crashed is to check if there are files there and how old they are.
Any filter must be included, otherwise error about parsing is return. Accurate error message about missing parameter will be better.
The main my problem probable was windows path delimiter \. The path must be doubleslashed and musn't end with \. \ can be replaced with /.
The correct filter for monitoring creation time is creation and not create or created as is written in documentation.
./check_nrpe -H hostname -p 5666 -c CheckFiles -a path=D:\ \TMP "pattern=*.*" "filter=creation gt -10m" MaxWarn=1 MaxCrit=1
Probably performance part of return string contains useless apostrophe '.
CheckFile ok|'found files'=0;1;1
Thanks for advice.
Martin
AndLar11/13/12 14:40:19 (7 months ago)
-
-
-
-








