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

[Filebeat] Changes to text fields in elasticsearch module #10414

Merged
merged 7 commits into from
Jan 31, 2019

Conversation

ycombinator
Copy link
Contributor

@ycombinator ycombinator commented Jan 29, 2019

This PR is an offshoot of conversations and decisions made in #10372 w.r.t text fields, but scoped to the elasticsearch module.

@ycombinator ycombinator requested review from a team as code owners January 29, 2019 19:02
@elasticmachine
Copy link
Collaborator

Pinging @elastic/stack-monitoring

@ycombinator ycombinator changed the title WIP: [Filebeat] Changes to text fields in stack modules [Filebeat] Changes to text fields in elasticsearch module Jan 29, 2019
@ycombinator ycombinator added review and removed in progress Pull request is currently in progress. labels Jan 29, 2019
@ycombinator ycombinator requested review from webmat and ruflin January 29, 2019 19:29
@ycombinator
Copy link
Contributor Author

jenkins, test this

Copy link
Contributor

@ruflin ruflin left a comment

Choose a reason for hiding this comment

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

Changelog?

@@ -9,7 +9,6 @@
"elasticsearch.slowlog.logger": "index.indexing.slowlog.index",
"elasticsearch.slowlog.routing": "",
"elasticsearch.slowlog.source_query": "{\"@timestamp\":\"2018-07-04T21:50:40.799Z\",\"metricset\":{\"module\":\"system\",\"rtt\":9610,\"name\":\"network\"},\"system\":{\"network\":{\"name\":\"bridg\",\"in\":{\"packets\":0,\"errors\":0,\"dropped\":0,\"bytes\":0},\"out\":{\"errors\":0,\"dropped\":0,\"packets\":1,\"bytes\":342}}},\"beat\":{\"name\":\"Rados-MacBook-Pro.local\",\"hostname\":\"Rados-MacBook-Pro.local\",\"version\":\"6.3.0\"},\"host\":{\"name\":\"Rados-MacBook-Pro.local\"}}",
"elasticsearch.slowlog.took": "221micros",
Copy link
Contributor

Choose a reason for hiding this comment

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

One thing I spot now: Below the message fields seems to contain everything including timestamp. Is that expected?

For the took. The plan is to extract the unit later or just remove it?

Copy link
Contributor Author

@ycombinator ycombinator Jan 30, 2019

Choose a reason for hiding this comment

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

I didn't follow your question about the message field?

For the took, I think we should just the unit as we already have the actual numeric value in ms, which seems more useful? BTW, this is something we're doing in the case of the elasticsearch/server fileset as well:

"elasticsearch.server.gc.collection_duration.unit",

Copy link
Contributor

Choose a reason for hiding this comment

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

The point about message is that once the header has been parsed and moved to other fields, only the rest of the message should be left in message.

Right now, the message fields looks like an event.original, which is meant to contain the pristine initial copy of the event (if the user wants this).

For the took field, I would keep it until we're ready to interpret it, no? Right now event.duration is based on the took_millis (removed by the pipeline), for simplicity, which is often rounded to 0ms. Elasticsearch is too fast. But I think it's worth keeping the custom field with the more precise timing until we can leverage it better (or until the ES log format gives us nanoseconds).

Copy link
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.

I'm good with the text field changes.

However I'd keep the took custom field.

@ycombinator
Copy link
Contributor Author

Alrighty, brought back the took field, this time as a keyword. @webmat @ruflin this is ready for another round of review, when you get a chance. Thanks!

Copy link
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.

Code LGTM

You just need to update fields.go accordingly :-)

@ycombinator
Copy link
Contributor Author

jenkins, test this

@ycombinator
Copy link
Contributor Author

jenkins, test this

@ycombinator ycombinator merged commit 33b789c into elastic:master Jan 31, 2019
@ycombinator ycombinator deleted the fb-ecs-text-fields branch January 31, 2019 05:42
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.

5 participants