# Filter for Sidewinder syslog

**URL:** <https://discuss.elastic.co/t/filter-for-sidewinder-syslog/156598>\
**Category:** Logstash\
**Created:** [November 14, 2018, 8:01am UTC](https://discuss.elastic.co/t/filter-for-sidewinder-syslog/156598 "2018-11-14T08:01:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mortueta](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@mortueta](https://discuss.elastic.co/u/mortueta)\
**Post date:** [November 14, 2018, 8:01am UTC](https://discuss.elastic.co/t/filter-for-sidewinder-syslog/156598/1 "2018-11-14T08:01:57Z")

</div>

Hi all,

I am trying to figure out which is the best way to filter a log of a sidewinnder firewall. The situation is that depending the log type the message contains more or less fields. The pattern is that always we have: **fieldname=value** , . Here you have an example:

`<46> Nov 14 08:48:02 fw auditd: date="2018-11-14 07:48:02 +0000",fac=f_ping_proxy,area=a_aclquery,type=t_aclallow,pri=p_major,pid=5441,logid=0,cmd=pingp,hostname=fw.x.com,event="ACL allow",srcip=192.168.10.10,srczone=internal,protocol=1,dst_geo=ES,dstip=8.8.8.88,dstzone=external,rule_name="int ext surfing",cache_hit=1,reason="Traffic allowed by policy.",application=ICMP`

I have tryed buldind with grok filter but there are 25 possibilities, because depending on the type and subtype it contains more fields or less and I believe that the is some way that it is easier and that will increment the performance.

Kind regards!

---

<div class="post-metadata">

**Author:** ![mortueta](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@mortueta](https://discuss.elastic.co/u/mortueta)\
**Post date:** [November 14, 2018, 11:49am UTC](https://discuss.elastic.co/t/filter-for-sidewinder-syslog/156598/2 "2018-11-14T11:49:07Z")

</div>

I have achieved this using the following combination with grok and kv

```
filter {

  grok {
    match => { "message" => "%{SYSLOG5424PRI}%{SYSLOGBASE} %{GREEDYDATA:message_kv}" }
    overwrite => ["message"]
  }

  kv {
    source => "message_kv"
    trim_value => "\""
    field_split => ","
    value_split => "="
    }
}

```

I tryed using ovewrwritte but it isn't working as expected, ineeded to create an auxiliary variable message\_kv.

---

<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:** [December 12, 2018, 11:49am UTC](https://discuss.elastic.co/t/filter-for-sidewinder-syslog/156598/3 "2018-12-12T11:49:13Z")

</div>

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