Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to filter winlogbeats events by keywords field #2237

Closed
vbohata opened this issue Aug 11, 2016 · 7 comments
Closed

Unable to filter winlogbeats events by keywords field #2237

vbohata opened this issue Aug 11, 2016 · 7 comments

Comments

@vbohata
Copy link

vbohata commented Aug 11, 2016

Version: v5.0.0-alpha5
Operating System: Windows Server 2012R2

I am unable to exclude events by keywords field. Config option " keywords: "Audit Success" " does not work, in beats log is:

2016-08-11T10:05:43+02:00 WARN unexpected type []string in contains condition as it accepts only strings. 
2016-08-11T10:05:43+02:00 WARN unexpected type []string in contains condition as it accepts only strings. 
2016-08-11T10:05:43+02:00 WARN unexpected type []string in contains condition as it accepts only strings. 
2016-08-11T10:05:43+02:00 WARN unexpected type []string in contains condition as it accepts only strings. 

Config option " keywords: ["Audit Success"] " also does not work but there is no error in beats log.

Processors config:

processors:
  - drop_event:
      when:
        and:
          - equals:
              log_name: Security
          - contains:
              keywords: ["Audit Success"]
@spacewander
Copy link
Contributor

Try keywords: "Audit Success"?

@vbohata
Copy link
Author

vbohata commented Aug 11, 2016

I tried it, with this, there is error in log: unexpected type []string

@ruflin
Copy link
Member

ruflin commented Aug 11, 2016

@andrewkroh Not sure if this could be related to #2209 ?

@vbohata
Copy link
Author

vbohata commented Aug 11, 2016

There is no more info in log. Just repeated "WARN unexpected type []string in contains condition as it accepts only strings." line.

@andrewkroh
Copy link
Member

In the event log record, keywords is an array. The contains filter only accepts a string value as its input which is what causes the warning and the filter to not work. We should enhance it to check each element in the array.

And like @spacewander said, it should be configured as keywords: "Audit Success".

@andrewkroh
Copy link
Member

I opened PR #2248 to make contains work on arrays of strings.

@andrewkroh
Copy link
Member

This should be fixed in 5.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants