# \[SOLVED\] How to filter log from syslog input

**URL:** https://discuss.elastic.co/t/solved-how-to-filter-log-from-syslog-input/47097
**Category:** Logstash
**Created:** [April 12, 2016, 9:24am UTC](https://discuss.elastic.co/t/solved-how-to-filter-log-from-syslog-input/47097 "2016-04-12T09:24:23Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![tatdat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tatdat/32/113160_2.png) [@tatdat](https://discuss.elastic.co/u/tatdat)
#### Post date: [April 12, 2016, 9:24am UTC](https://discuss.elastic.co/t/solved-how-to-filter-log-from-syslog-input/47097/1 "2016-04-12T09:24:23Z")

</div>

i have logstash instanse using syslog input plugin for get log from access point .  
I try to save log to file (using file output) and i get some line log (json format)

> {"tags":["\_grokparsefailure\_sysloginput"],"message":"\<134\>VWLAN\_Controller: \*Dot1x\_NW\_MsgTask\_4: Apr 12 08:53:12.862: #APF-6-USER\_NAME\_CREATED: apf\_ms.c:7761 Username entry (Wifi-Guest) with length (253) created for mobile 18:3a:2d:ca:91:14 ","@timestamp":"2016-04-12T09:00:00.459Z","host":"10.1.6.56","facility":0,"priority":0,"severity":0,"facility\_label":"kernel","severity\_label":"Emergency","@version":"1"}

I have question : How to filter log above?  
After that i used grok filter for filter plantext. But my log is json format and i want to filter "message" only

Thanks

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [April 12, 2016, 10:25am UTC](https://discuss.elastic.co/t/solved-how-to-filter-log-from-syslog-input/47097/2 "2016-04-12T10:25:13Z")

</div>

How did you solve it?

---

<div class="post-metadata">

### Author: ![tatdat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tatdat/32/113160_2.png) [@tatdat](https://discuss.elastic.co/u/tatdat)
#### Post date: [April 13, 2016, 10:17am UTC](https://discuss.elastic.co/t/solved-how-to-filter-log-from-syslog-input/47097/3 "2016-04-13T10:17:37Z")

</div>

In ssyslog input. i added field

```
add_field => {
              "type" => "network"
              "beatname"=>"fb-network"
                "beattype"=>"network"
   }

```

I want log from access point and log from filebeat in same index ( "beatname"=\>"fb-network")

After that, I using filter grok ..

```
if [type] == "network" {
  grok {
    match => { "message" => "grok filter"
  }
}

```

😃

---

<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 6, 2017, 5:02am UTC](https://discuss.elastic.co/t/solved-how-to-filter-log-from-syslog-input/47097/4 "2017-07-06T05:02:29Z")

</div>


