# Prune filter - Whitelist JSON subfields & per-pipeline log file

**URL:** <https://discuss.elastic.co/t/prune-filter-whitelist-json-subfields-per-pipeline-log-file/291298>\
**Category:** Logstash\
**Created:** [December 9, 2021, 7:53am UTC](https://discuss.elastic.co/t/prune-filter-whitelist-json-subfields-per-pipeline-log-file/291298 "2021-12-09T07:53:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stillfreem](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stillfreem/32/85628_2.png) [@stillfreem](https://discuss.elastic.co/u/stillfreem)\
**Post date:** [December 9, 2021, 7:53am UTC](https://discuss.elastic.co/t/prune-filter-whitelist-json-subfields-per-pipeline-log-file/291298/1 "2021-12-09T07:53:04Z")

</div>

Hi All,

I've got a couple of questions!

1. Can I whitelist only certain field from JSON using Prune? I saw similar topics suggesting ruby but wanted to avoid this as its a bit too complicated for me.  
For instance I'd like to whitelist `LogData.Tracepoint` (check below picture)  
I'm going to need this as I'm planning to get this field into Sentinel using the log analytics output plugin.

Below picture is my output

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/0/50eb1f5b145a7f5992ee7e85357844e1eeab0ca1.png)

1. in `logstash.yml` when I set the `pipeline.separate_logs:` to true, do I need to create a log file or such is being automatically generated getting the name from the config file for that particular pipeline?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [December 9, 2021, 3:42pm UTC](https://discuss.elastic.co/t/prune-filter-whitelist-json-subfields-per-pipeline-log-file/291298/2 "2021-12-09T15:42:39Z")

</div>

prune only works on top-level fields.

log4j2 will create the log files, you do not need to do it.

---

<div class="post-metadata">

**Author:** ![stillfreem](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stillfreem/32/85628_2.png) [@stillfreem](https://discuss.elastic.co/u/stillfreem)\
**Post date:** [December 10, 2021, 11:49am UTC](https://discuss.elastic.co/t/prune-filter-whitelist-json-subfields-per-pipeline-log-file/291298/3 "2021-12-10T11:49:06Z")

</div>

Thank you very much @Badger

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 7, 2022, 11:49am UTC](https://discuss.elastic.co/t/prune-filter-whitelist-json-subfields-per-pipeline-log-file/291298/4 "2022-01-07T11:49:25Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
