# So..what do I use with 2.0 now that "type" is gone?

**URL:** <https://discuss.elastic.co/t/so-what-do-i-use-with-2-0-now-that-type-is-gone/34450>\
**Category:** Logstash\
**Created:** [November 12, 2015, 6:25pm UTC](https://discuss.elastic.co/t/so-what-do-i-use-with-2-0-now-that-type-is-gone/34450 "2015-11-12T18:25:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![DigiAngel](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@DigiAngel](https://discuss.elastic.co/u/DigiAngel)\
**Post date:** [November 12, 2015, 6:25pm UTC](https://discuss.elastic.co/t/so-what-do-i-use-with-2-0-now-that-type-is-gone/34450/1 "2015-11-12T18:25:37Z")

</div>

I use type for both input and filter:

```
input {
        udp {
                type => "Snort"
                port => 5514
        }
}

```

and:

```
if [type] == "Snort" {
                grok {
                        match => [lot's of stuff here]
     }
}

```

Now what do I do? What other options do I have?

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [November 12, 2015, 6:41pm UTC](https://discuss.elastic.co/t/so-what-do-i-use-with-2-0-now-that-type-is-gone/34450/2 "2015-11-12T18:41:21Z")

</div>

The `type` field still works in the input block. You just can't use it in place of conditionals now (old 1.0 - 1.2 behavior).

Old behavior ( **DO NOT USE** ):

```
filter {
  grok {
    match => [lot's of stuff here]
    type => "Snort"
  }
}

```

What you have with your conditional is the correct way to use `type`.

---

<div class="post-metadata">

**Author:** ![DigiAngel](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@DigiAngel](https://discuss.elastic.co/u/DigiAngel)\
**Post date:** [November 12, 2015, 6:49pm UTC](https://discuss.elastic.co/t/so-what-do-i-use-with-2-0-now-that-type-is-gone/34450/3 "2015-11-12T18:49:35Z")

</div>

Two questions: Why type type included for INPUT when you can't use it anywhere else? And, how do I do a conditional now, if I can't specify type? How do I tell

```
input {
        udp {
                type => "Snort"
                port => 5514
        }
        udp {
                type => "Conn"
                port => 6514
        }
        udp {
                type => "Syslog"
                port => 7514
        }
        udp {
                type => "Logon"
                port => 7515
        }

}

```

the above match with:

```
filter {

        if [type] == "Snort" {
                grok {
                        match => [stuff]
                }
        }

        if [type] == "Conn" {
                grok {
                        several match => [stuff]

                }
        }

        if [type] == "Syslog" {
                grok {
                        several match lines match => [stuff]

                }
        }

        if [type] == "Logon" {
                grok {
                        match => [stuff]

                }
        }
}

```

How do match a specific input, to a specific filter now? Thank you.

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [November 12, 2015, 7:08pm UTC](https://discuss.elastic.co/t/so-what-do-i-use-with-2-0-now-that-type-is-gone/34450/4 "2015-11-12T19:08:22Z")

</div>

> [@DigiAngel](#):
>
> Why type type included for INPUT when you can't use it anywhere else?

You _can_ use `type` as a regular field. You just can't use `type => "value"` in place of conditionals. Logstash still uses `type` to set the Elasticsearch document `_type` on output.

> [@DigiAngel](#):
>
> And, how do I do a conditional now, if I can't specify type?

Again, you _can_ use type. The examples you've provided are completely valid and usable.

---

<div class="post-metadata">

**Author:** ![DigiAngel](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@DigiAngel](https://discuss.elastic.co/u/DigiAngel)\
**Post date:** [November 12, 2015, 7:17pm UTC](https://discuss.elastic.co/t/so-what-do-i-use-with-2-0-now-that-type-is-gone/34450/5 "2015-11-12T19:17:49Z")

</div>

Ah...I see now (I think)...from the Breaking Changes:

```
The following deprecated configuration settings are removed in this release:
input plugin configuration settings: debug, format, charset, message_format

output plugin configuration settings: type, tags, exclude_tags.

filter plugin configuration settings: type, tags, exclude_tags.

```

that had me confused.....ok thanks for clearing that up...I'm feeling better every minute with my pending upgrade 😄

---

<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:22am UTC](https://discuss.elastic.co/t/so-what-do-i-use-with-2-0-now-that-type-is-gone/34450/6 "2017-07-06T05:22:58Z")

</div>


