# Not write to Elastic search if filed is null

**URL:** <https://discuss.elastic.co/t/not-write-to-elastic-search-if-filed-is-null/118252>\
**Category:** Logstash\
**Created:** [February 2, 2018, 4:05pm UTC](https://discuss.elastic.co/t/not-write-to-elastic-search-if-filed-is-null/118252 "2018-02-02T16:05:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![robertchen117](https://avatars.discourse-cdn.com/v4/letter/r/edb3f5/32.png) [@robertchen117](https://discuss.elastic.co/u/robertchen117)\
**Post date:** [February 2, 2018, 4:05pm UTC](https://discuss.elastic.co/t/not-write-to-elastic-search-if-filed-is-null/118252/1 "2018-02-02T16:05:52Z")

</div>

My log parsed by logstash with some fields are null string, message is like this:  
USR: NA, SID: null ....

So SID is null, how to not write to ELK if field is "null" ?  
SID null

---

<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:** [March 2, 2018, 4:06pm UTC](https://discuss.elastic.co/t/not-write-to-elastic-search-if-filed-is-null/118252/2 "2018-03-02T16:06:01Z")

</div>

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