# Logstash if statement for program

**URL:** <https://discuss.elastic.co/t/logstash-if-statement-for-program/234020>\
**Category:** Logstash\
**Created:** [May 23, 2020, 10:22pm UTC](https://discuss.elastic.co/t/logstash-if-statement-for-program/234020 "2020-05-23T22:22:20Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![Rasoul\_Ahmadi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rasoul_ahmadi/32/68520_2.png) [@Rasoul\_Ahmadi](https://discuss.elastic.co/u/Rasoul_Ahmadi)\
**Post date:** [May 28, 2020, 5:56am UTC](https://discuss.elastic.co/t/logstash-if-statement-for-program/234020/8 "2020-05-28T05:56:19Z")

</div>

thanks alot  
the if statement works fine there is something seriusly worng and i cant tshoot it alone  
i will appreciate if you could check this post out

> [@Logstash elasticsearch output problem](https://discuss.elastic.co/t/logstash-elasticsearch-output-problem/234577/6):
>
> what could be wrong with this particular config? i have multiple configs just like this and everything is working except this one input { file { path =\> ["${LL\_LOG\_IMPORT\_NGINX:/var/log/remote/ingress-nginx/nginx-access.log}"] type =\> "nginx" sincedb\_path =\> "${LL\_SINCEDB\_IMPORT\_NGINX:/var/lib/logstash/plugins/inputs/file/nginx-import.sincedb}" } } filter { if [type] == "nginx" { grok { match =\> { "message" =\> "%{TIMESTAMP\_IS…

---

_[View the full topic](https://discuss.elastic.co/t/logstash-if-statement-for-program/234020)._
