check_winfile filter option
Posted: Fri Mar 31, 2017 2:25 pm
Hello. I've spent so much time on this and am hoping someone else can spot my problem.
About my setup:
Nagios is installed on a Linux server which I can only access via the NagiosQL admin module.
I've downloaded the check_winfile https://www.itefix.net/check_winfile for NRPE plugin. The perl file and .exe are in "C:\Program Files\NSClient++\scripts" on my local machine from which I am running NagiosQL and that I have NSClient++ installed on.
My COMMAND definition in NagiosQL is as follows: $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_winfile -a $ARG1$ $ARG2$ $ARG3$
My SERVICE definition in NagiosQl uses the following: $ARG1$ --target c:/temp $ARG2$ --filter size gt 1
[/settings/external scripts/scripts] : check_winfile=scripts\\check_winfile.exe //T:30 //NoLogo $ARG1$ $ARG2$ $ARG3$
I've downloaded Strawberry Perl ver. 5.24.1 and added Time::ParseDate Module
Output in Nagios is as follows:
Current Status: OK (for 0d 0h 15m 6s)
Status Information: FILE OK - 51 files to consider
Performance Data: 'selected files'=51 'all files'=51 'deleted files'=0
My issue is that anything that I add as ARG2 doesn't produce the desired effect. I tried ...
--filter size gt 10KB => UNKNOWN (No output returned from plugin)
-filter size gt 10KB => UNKNOWN (Incorrect command line argument supplied)
"filter=size gt 10KB" => UNKNOWN (Incorrect command line argument supplied)
I tried variations like name match /file.txt AND age gt 24hours
I've tried using --critical and --warning values in ARG2 and 3 and gotten the UNKNOWN status as well
It seems to be a format issue with the way the args are put into nagiosQL, but the --target options works and the others don't
Any insight would be greatly appreciate.
Thanks
About my setup:
Nagios is installed on a Linux server which I can only access via the NagiosQL admin module.
I've downloaded the check_winfile https://www.itefix.net/check_winfile for NRPE plugin. The perl file and .exe are in "C:\Program Files\NSClient++\scripts" on my local machine from which I am running NagiosQL and that I have NSClient++ installed on.
My COMMAND definition in NagiosQL is as follows: $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_winfile -a $ARG1$ $ARG2$ $ARG3$
My SERVICE definition in NagiosQl uses the following: $ARG1$ --target c:/temp $ARG2$ --filter size gt 1
[/settings/external scripts/scripts] : check_winfile=scripts\\check_winfile.exe //T:30 //NoLogo $ARG1$ $ARG2$ $ARG3$
I've downloaded Strawberry Perl ver. 5.24.1 and added Time::ParseDate Module
Output in Nagios is as follows:
Current Status: OK (for 0d 0h 15m 6s)
Status Information: FILE OK - 51 files to consider
Performance Data: 'selected files'=51 'all files'=51 'deleted files'=0
My issue is that anything that I add as ARG2 doesn't produce the desired effect. I tried ...
--filter size gt 10KB => UNKNOWN (No output returned from plugin)
-filter size gt 10KB => UNKNOWN (Incorrect command line argument supplied)
"filter=size gt 10KB" => UNKNOWN (Incorrect command line argument supplied)
I tried variations like name match /file.txt AND age gt 24hours
I've tried using --critical and --warning values in ARG2 and 3 and gotten the UNKNOWN status as well
It seems to be a format issue with the way the args are put into nagiosQL, but the --target options works and the others don't
Any insight would be greatly appreciate.
Thanks