# Help in Logstash

**URL:** <https://discuss.elastic.co/t/help-in-logstash/109258>\
**Category:** Logstash\
**Created:** [November 27, 2017, 5:26pm UTC](https://discuss.elastic.co/t/help-in-logstash/109258 "2017-11-27T17:26:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sridhar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sridhar/32/64860_2.png) [@Sridhar](https://discuss.elastic.co/u/Sridhar)\
**Post date:** [November 27, 2017, 5:26pm UTC](https://discuss.elastic.co/t/help-in-logstash/109258/1 "2017-11-27T17:26:21Z")

</div>

Hi All,

I'm going to setup an elk stack to monitor logs.

We have 4 websphere servers and 4 IBM http servers.

Websphere Logs:  
SystemOut.log  
SystemErr.log

Http Server logs:  
Access.log  
Error.log  
All these logs will be pushed via filebeat and process via Logstash and stored in Elasticsearch.

Based on the log type, we need to create filters and store in same index

Please help me.

Thanks,  
Sridhar. B

---

<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:** [November 27, 2017, 9:02pm UTC](https://discuss.elastic.co/t/help-in-logstash/109258/2 "2017-11-27T21:02:42Z")

</div>

What part do you need help with? How far have you come so far?

---

<div class="post-metadata">

**Author:** ![Sridhar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sridhar/32/64860_2.png) [@Sridhar](https://discuss.elastic.co/u/Sridhar)\
**Post date:** [November 27, 2017, 11:50pm UTC](https://discuss.elastic.co/t/help-in-logstash/109258/3 "2017-11-27T23:50:14Z")

</div>

hi.. I want help in Logstash conf file..how to create a filters based on log type.

---

<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:** [November 28, 2017, 6:26am UTC](https://discuss.elastic.co/t/help-in-logstash/109258/4 "2017-11-28T06:26:06Z")

</div>

> how to create a filters based on log type.

```plaintext
filter {
  if [type] == "whatever" {
    ...
  } else {
    ...
  }
}

```

See [Accessing event data and fields | Logstash Reference [8.11] | Elastic](https://www.elastic.co/guide/en/logstash/current/event-dependent-configuration.html).

---

<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 26, 2017, 6:26am UTC](https://discuss.elastic.co/t/help-in-logstash/109258/5 "2017-12-26T06:26:10Z")

</div>

Closed on December 26, 2017, 6:26am UTC

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