# Logstash and netflow filter problem / question with filter and if\[exp\]

**URL:** <https://discuss.elastic.co/t/logstash-and-netflow-filter-problem-question-with-filter-and-if-exp/90720>\
**Category:** Logstash\
**Created:** [June 24, 2017, 4:57pm UTC](https://discuss.elastic.co/t/logstash-and-netflow-filter-problem-question-with-filter-and-if-exp/90720 "2017-06-24T16:57:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![digitalpilot](https://avatars.discourse-cdn.com/v4/letter/d/35a633/32.png) [@digitalpilot](https://discuss.elastic.co/u/digitalpilot)\
**Post date:** [June 24, 2017, 4:57pm UTC](https://discuss.elastic.co/t/logstash-and-netflow-filter-problem-question-with-filter-and-if-exp/90720/1 "2017-06-24T16:57:02Z")

</div>

Hi,

using latest versions of netflow / ipfix codec with logstash.

I'm trying to create a filter that will match on the BGP ASN and set a new field with the  
human name for that ASN. At the moment I'm setting a tag, which will work when the  
enclosing IF is not part of the config. So something is broke with my if [EXPRESSION]

filter {

```
if [ipfix.bgpDestinationAsNumber] == '174' {
    mutate {
        add_tag => { "FUBAR" => "BARF" }
    }
}

```

}

ipfix.bgpSestinationAsNumber is a numeric field

Thoughts ??

Thank you

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [June 27, 2017, 6:37pm UTC](https://discuss.elastic.co/t/logstash-and-netflow-filter-problem-question-with-filter-and-if-exp/90720/2 "2017-06-27T18:37:28Z")

</div>

Duplicate of [Logstash filter section problem](https://discuss.elastic.co/t/logstash-filter-section-problem/90826).

---

<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:** [July 25, 2017, 6:37pm UTC](https://discuss.elastic.co/t/logstash-and-netflow-filter-problem-question-with-filter-and-if-exp/90720/3 "2017-07-25T18:37:53Z")

</div>

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