Nrpe "checkfiles" problem

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
donlewis
Posts: 3
Joined: Thu Sep 03, 2015 5:06 am

Nrpe "checkfiles" problem

Post by donlewis »

Hi!
I have an "interesting" problem:
I want to run the following nrpe command in order to find a file(s) in a specific path:
/check_nrpe -n -H backserv -c checkfiles -a path="d:\\temp\\Backup\\1\\" pattern=*.tar filter="written > -8d" syntax="Backup files exist :%(name) size:%(size) bytes" MinWarn=0 MinCrit=0
First case: the specific file(s) exist, the command returns the following results (from nsclient log):
D disk Created command: warn=count<=0 crit=count<=0 "filter=written > -8d" pattern=*.tar "detail-syntax=Backup files exist :%(name) size:%(size) bytes" top-syntax=${list} path=d:\temp\Backup\1\ empty-state=ok
L cli OK: Backup files exist:filesize.tar size:24069 bytes
L cli Performance data: 'count'=1;0;0
Second case: the requested file(s) doesn't exist, so the command should run to "CRITICAL" state and gives back the following detailed results (from nsclient log):
D disk Created command: warn=count<=0 crit=count<=0 "filter=written > -8d" pattern=*.tar "detail-syntax=Backup files exist :%(name) size:%(size) bytes" top-syntax=${list} path=d:\temp\Backup\1\ empty-state=ok
L cli OK: No files found
L cli Performance data: 'count'=0;0;0
My question: WHY??? Why "cli OK" and not "cli CRITICAL"? In my opinion that's very embarassing and irritating.

Can you help me? Any help appreciated!

NSclient version: 0.4.3.143 2015-04-29

Thnx in advance,
Don Lewis
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Nrpe "checkfiles" problem

Post by Box293 »

This appears to be a bug with NSClient++ 0.4.3.143.

I tested with 0.4.105 and the behaviour is as it should be. Problem also occurs on 0.4.2.114 but with a slightly different output.

I suggest filing this as an issue on GitHub:
https://github.com/mickem/nscp
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked