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

Introduce process.* field set reuse filtering #1847

Merged
merged 10 commits into from
Mar 22, 2022

Conversation

ebeahan
Copy link
Member

@ebeahan ebeahan commented Mar 22, 2022

Follow-up to #1842

The Linux event model requires many reuses of the process.* field set, but not all these reuses need the entire field set be reused.

This change leverages the --subset feature to limit the number of new fields introduced by these complex reuses. No existing process.* or process.parent.* fields are affected or removed by this change.

8.3.0-dev+exp,true,process,process.parent.entry_meta.source.subdomain,keyword,extended,,east,The subdomain of the domain.
8.3.0-dev+exp,true,process,process.parent.entry_meta.source.top_level_domain,keyword,extended,,co.uk,"The effective top level domain (com, org, net, co.uk)."
8.3.0-dev+exp,true,process,process.parent.entry_meta.type,keyword,extended,,,The entry type for the entry session leader.
8.3.0-dev+exp,true,process,process.parent.env_vars,object,extended,,"{""USER"": ""elastic"",""LANG"": ""en_US.UTF-8"",""HOME"": ""/home/elastic""}",Environment variables set at the time of the event.
Copy link
Contributor

Choose a reason for hiding this comment

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

Another ? for process.parent.env_vars

I don't see any env_vars in https://github.com/elastic/endpoint-package/blob/49d9a9ac02762afa3ad158febe5edc164883d715/custom_subsets/elastic_endpoint/process/linux_event_model_event.yaml , but I know we added it for it, so just double checking

Copy link
Contributor

Choose a reason for hiding this comment

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

I would say only top level process gets env_vars. I will submit another PR to endpoint-package.

Copy link
Member Author

Choose a reason for hiding this comment

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

I added process.parent.env_vars to keep process.* and process.parent.* more symmetrical. Open to changing if there's any differing views.

Copy link
Contributor

@kgeller kgeller left a comment

Choose a reason for hiding this comment

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

LGTM

@mitodrummer
Copy link
Contributor

endpoint-package updated to include mapping for process.env_vars
elastic/endpoint-package#240

Copy link
Contributor

@mitodrummer mitodrummer left a comment

Choose a reason for hiding this comment

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

LGTM!

@ebeahan ebeahan merged commit 40eab34 into elastic:main Mar 22, 2022
@ebeahan ebeahan deleted the introduce-process-reuse-filtering branch March 22, 2022 19:44
ebeahan added a commit to ebeahan/ecs that referenced this pull request Mar 22, 2022
* add location for subset filters

* add --subset arg to make

* artifact changes with new filterings

* also need to account for experimental fields

* correct experimental artifacts

* experimental subset def

* ignore subset artifacts

* add env_vars

* add interactive and parent.interactive

* changelog

(cherry picked from commit 40eab34)

# Conflicts:
#	experimental/generated/csv/fields.csv
#	experimental/generated/elasticsearch/composable/template.json
#	generated/csv/fields.csv
#	generated/elasticsearch/composable/template.json
@ebeahan
Copy link
Member Author

ebeahan commented Mar 22, 2022

💚 All backports created successfully

Status Branch Result
8.2

Questions ?

Please refer to the Backport tool documentation

ebeahan added a commit that referenced this pull request Mar 22, 2022
* add location for subset filters

* add --subset arg to make

* artifact changes with new filterings

* also need to account for experimental fields

* correct experimental artifacts

* experimental subset def

* ignore subset artifacts

* add env_vars

* add interactive and parent.interactive

* changelog

(cherry picked from commit 40eab34)
@ebeahan ebeahan mentioned this pull request Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants