# TTY grok filter needs changed

**URL:** <https://discuss.elastic.co/t/tty-grok-filter-needs-changed/72669>\
**Category:** Logstash\
**Created:** [January 24, 2017, 4:21pm UTC](https://discuss.elastic.co/t/tty-grok-filter-needs-changed/72669 "2017-01-24T16:21:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![panaman](https://avatars.discourse-cdn.com/v4/letter/p/3da27b/32.png) [@panaman](https://discuss.elastic.co/u/panaman)\
**Post date:** [January 24, 2017, 4:21pm UTC](https://discuss.elastic.co/t/tty-grok-filter-needs-changed/72669/1 "2017-01-24T16:21:56Z")

</div>

The current TTY grok filter does not match if does not contain "/dev"  
It will not match the secure log on centos.

```auto
Jan 24 16:19:36 USOHWC-ESCTL1 sudo: panaman : TTY=pts/1 ; PWD=/home/panaman ; USER=root ; COMMAND=/bin/tail /var/log/secure
```

If you change the TTY grok filter to the following, it will work:

```auto
TTY ((:?)(/dev/)?(pts|tty([pq])?)(\w+)?/?(?:[0-9]+))
```

---

<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:** [January 24, 2017, 8:12pm UTC](https://discuss.elastic.co/t/tty-grok-filter-needs-changed/72669/2 "2017-01-24T20:12:04Z")

</div>

Perhaps you can send a pull request for this? Or at least file an issue?

---

<div class="post-metadata">

**Author:** ![panaman](https://avatars.discourse-cdn.com/v4/letter/p/3da27b/32.png) [@panaman](https://discuss.elastic.co/u/panaman)\
**Post date:** [January 31, 2017, 9:49pm UTC](https://discuss.elastic.co/t/tty-grok-filter-needs-changed/72669/3 "2017-01-31T21:49:24Z")

</div>

I went to go file an issue but it says to post it here

> [@](#):
>
> Please post all product and debugging questions on our [forum](https://discuss.elastic.co/c/logstash). Your questions will reach our wider community members there, and if we confirm that there is a bug, then we can open a new issue here.

---

<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:** [February 1, 2017, 6:59am UTC](https://discuss.elastic.co/t/tty-grok-filter-needs-changed/72669/4 "2017-02-01T06:59:55Z")

</div>

Yes, and I confirm that this (likely) is a bug. Therefore an issue is in order.

---

<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:** [March 1, 2017, 6:59am UTC](https://discuss.elastic.co/t/tty-grok-filter-needs-changed/72669/5 "2017-03-01T06:59:58Z")

</div>

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