# If condition statement in Logstash

**URL:** https://discuss.elastic.co/t/if-condition-statement-in-logstash/117511
**Category:** Logstash
**Created:** [January 29, 2018, 6:33pm UTC](https://discuss.elastic.co/t/if-condition-statement-in-logstash/117511 "2018-01-29T18:33:46Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![rpendela](https://avatars.discourse-cdn.com/v4/letter/r/3be4f8/32.png) [@rpendela](https://discuss.elastic.co/u/rpendela)
#### Post date: [January 29, 2018, 6:33pm UTC](https://discuss.elastic.co/t/if-condition-statement-in-logstash/117511/1 "2018-01-29T18:33:47Z")

</div>

Continuing the discussion from [Logstash or condition in if statement](https://discuss.elastic.co/t/logstash-or-condition-in-if-statement/70403/2):

@magnusbaeck, I have a **DeviceName** filed in my logs and I am trying to add a tag based on below condition but not seeing any tags added to the logs

```
` if [DeviceName] == "%austinFW1" or [DeviceName] == "%corpFW1" {
    mutate {
        add_tag => ["Austin-Firewalls"]
    }  
    
}`

```

What might be the cause?

---

<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: [February 26, 2018, 6:33pm UTC](https://discuss.elastic.co/t/if-condition-statement-in-logstash/117511/2 "2018-02-26T18:33:47Z")

</div>

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