Skip to content

Elasticsearch/audit fileset should be more lenient in parsing node name#10135

Merged
ycombinator merged 4 commits intoelastic:masterfrom
ycombinator:fb-es-audit-bugfix
Jan 18, 2019
Merged

Elasticsearch/audit fileset should be more lenient in parsing node name#10135
ycombinator merged 4 commits intoelastic:masterfrom
ycombinator:fb-es-audit-bugfix

Conversation

@ycombinator
Copy link
Copy Markdown
Contributor

@ycombinator ycombinator commented Jan 16, 2019

Resolves #10035.

This PR:

  • Uses DATA instead of WORD in the grok pattern for parsing out elasticsearch.node.name,
  • Breaks out the grok pattern into pattern definitions to increase readability
  • Removes a redundant ? after a * in the grok pattern (between elasticsearch.audit.action and elasticsearch.audit.uri), and
  • Properly reindents the pipeline JSON (so you might want to view the diff with ?w=1 appended to the URL)

@ycombinator ycombinator requested a review from a team as a code owner January 16, 2019 23:52
@ycombinator ycombinator added bug in progress Pull request is currently in progress. needs_backport PR is waiting to be backported to other branches. v7.0.0 Feature:Stack Monitoring v6.7.0 labels Jan 16, 2019
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/stack-monitoring

@ycombinator
Copy link
Copy Markdown
Contributor Author

jenkins, test this

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@webmat just pinging you here on this for awareness. looks like ECS data.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, let's look at event categorization after FF. This field is fine 👍

"ES_AUDIT_REQUEST_BODY": "(request_body\\=\\[%{DATA:http.request.body.content}\\])?"
},
"patterns": [
"%{ES_TIMESTAMP}\\s*%{ES_NODE_NAME}\\s*%{ES_AUDIT_LAYER}\\s*%{ES_AUDIT_EVENT_TYPE}\\s*%{ES_AUDIT_ORIGIN_TYPE},?\\s*%{ES_AUDIT_ORIGIN_ADDRESS},?\\s*%{ES_AUDIT_PRINCIPAL},?\\s*%{ES_AUDIT_ACTION},?\\s*%{ES_AUDIT_URI},?\\s*%{ES_AUDIT_REQUEST},?\\s*%{ES_AUDIT_REQUEST_BODY},?"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

Copy link
Copy Markdown
Contributor

@webmat webmat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love the improved readability 💯

@ycombinator ycombinator merged commit 93851c2 into elastic:master Jan 18, 2019
@ycombinator ycombinator deleted the fb-es-audit-bugfix branch January 18, 2019 15:03
@ycombinator ycombinator removed the needs_backport PR is waiting to be backported to other branches. label Jan 18, 2019
ycombinator added a commit that referenced this pull request Jan 21, 2019
… lenient in parsing node name (#10174)

Cherry-pick of PR #10135 to 6.x branch. Original message: 

Resolves #10035.

This PR:

* Uses `DATA` instead of `WORD` in the grok pattern for parsing out `elasticsearch.node.name`,
* Breaks out the grok pattern into pattern definitions to increase readability
* Removes a redundant `?` after a `*` in the grok pattern (between `elasticsearch.audit.action` and `elasticsearch.audit.uri`), and
* Properly reindents the pipeline JSON (so you might want to view the diff with `?w=1` appended to the URL)
@ycombinator ycombinator added the needs_backport PR is waiting to be backported to other branches. label Jan 24, 2019
@ycombinator ycombinator removed the needs_backport PR is waiting to be backported to other branches. label Jan 31, 2019
ycombinator added a commit that referenced this pull request Feb 1, 2019
… lenient in parsing node name (#10465)

Cherry-pick of PR #10135 to 6.6 branch. Original message: 

Resolves #10035.

This PR:

* Uses `DATA` instead of `WORD` in the grok pattern for parsing out `elasticsearch.node.name`,
* Breaks out the grok pattern into pattern definitions to increase readability
* Removes a redundant `?` after a `*` in the grok pattern (between `elasticsearch.audit.action` and `elasticsearch.audit.uri`), and
* Properly reindents the pipeline JSON (so you might want to view the diff with `?w=1` appended to the URL)
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…be more lenient in parsing node name (elastic#10465)

Cherry-pick of PR elastic#10135 to 6.6 branch. Original message: 

Resolves elastic#10035.

This PR:

* Uses `DATA` instead of `WORD` in the grok pattern for parsing out `elasticsearch.node.name`,
* Breaks out the grok pattern into pattern definitions to increase readability
* Removes a redundant `?` after a `*` in the grok pattern (between `elasticsearch.audit.action` and `elasticsearch.audit.uri`), and
* Properly reindents the pipeline JSON (so you might want to view the diff with `?w=1` appended to the URL)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants