# Logstash filter conditions

**URL:** <https://discuss.elastic.co/t/logstash-filter-conditions/251175>\
**Category:** Logstash\
**Created:** [October 6, 2020, 6:43pm UTC](https://discuss.elastic.co/t/logstash-filter-conditions/251175 "2020-10-06T18:43:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MMerel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mmerel/32/76751_2.png) [@MMerel](https://discuss.elastic.co/u/MMerel)\
**Post date:** [October 6, 2020, 6:43pm UTC](https://discuss.elastic.co/t/logstash-filter-conditions/251175/1 "2020-10-06T18:43:38Z")

</div>

hi there, sorry to bother you but i´m completely new at this , I´m using version 7.9.2 of Elastic,Kibana ,Logstash and Beats , i successuflly connected them to a MQQT broker ang got some information about camera analytics . I want to filter only the timestamp, from the message ,only the motion=0 or 1 and the first level of topic since this is the sender information , I managed to apply some filtering but i fail at the rest . i´m lost here ,can you help me? this is my pipeline.conf :

The # character at the beginning of a line indicates a comment. Use

# comments to describe your configuration.

input {  
beats {  
port =\> "5044"  
}  
}

# The filter part of this file is commented out to indicate that it is

# optional.

#filter {}  
filter {  
prune {  
whitelist\_names =\> ["message","@timestamp"]  
whitelist\_names =\> ["mqtt"]  
}  
}  
output {  
stdout { codec =\> rubydebug}  
elasticsearch {  
hosts =\> ["localhost:9200"]  
}  
}

Thank you in advance for the help!  
P.D.  
this is how the message looks like  
[mqtt|618x319](https://discuss.elastic.co/uploads/short-url/sr1SPUrdK504EGAoqdurDBEHOuK.jpeg)

---

<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:** [November 3, 2020, 6:43pm UTC](https://discuss.elastic.co/t/logstash-filter-conditions/251175/2 "2020-11-03T18:43:49Z")

</div>

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