mickem / nscp

NSClient++
http://nsclient.org
GNU General Public License v2.0
233 stars 91 forks source link

%count% Is Broken In NSClient 0.5.x / CheckEventLog #781

Open vmikhelson opened 1 year ago

vmikhelson commented 1 year ago

Issue and Steps to Reproduce

Variable "count" is not populated in CheckEventLog on Windows.

Run check_nrpe -H -c nrpe_CheckEventLog_userauth

NSXC.ini should have a line similar to the following:

;Eventlog Auth Failures nrpe_CheckEventLog_userauth = CheckEventLog scan-range=-10m MaxWarn=1 MaxCrit=5 file=Security "filter=id=4625 and message not like 'Authz'" unique=1 "syntax=^0%severity% ^1%source%^2(%count%)^4%message%"

Observe the "^2" tag always returns (0)


### Expected Behavior

Count should return the number of the message occurrences.

### Actual Behavior

Count always returns 0.

### Details

* Tried on NSClient++ versions: 0.5.2.10, 20, 35, 39, and 41
* OS and Version: Windows Server 2016
* Checking from: Nagios Core 4.4.7
* Checking with: check_nrpe
* 
### Additional Details

NSClient++ log:

Nothing relevant in the nsc.log.