mickem / nscp

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

NSClient++ Check Eventlog #718

Open BastianBoukerma opened 3 years ago

BastianBoukerma commented 3 years ago

Issue and Steps to Reproduce

Describe your issue and tell us how to reproduce it.

I want to catch exceptions for event logs in the local NSClient.ini file. So I made an alias for the CheckEventlog and started the exceptions in it to maintain. My problem is that the syntax for the exceptions in the new version no longer works as it does on older versions.

**Sytnax of the Alias with Exceptions**: CheckEventLog file=system file=application file=security MaxWarn=1 MaxCrit=1 unique "syntax=[%source% %severity% %id%] %message%" "filter=generated gt -24h AND severity IN ('critical', 'error', 'warning') AND NOT (source='VSS' AND id=12289)"

I think the "NOT" is the problem. Without Exceptions it works. In the LOG's we can see that the NSClient ist set "?" for "NOT".

Expected Behavior

It works..

Actual Behavior

I get an Error. U can see this in the Point LOG.

Details

Additional Details

NSClient++ log:

2021-02-22 14:31:46: debug:c:\source\master\include\parsers\filter\modern_filter.cpp:29: Invalid types in binary operator, could not convert to string from (i){-24}, (s){h}: 12:32 > convert(0) and ? ( Service Control Manager = VSS and 7036 = 12289 )