# Syslog input going to "%{\[@metadata\]\[beat\]}-2019.05.28"

**URL:** <https://discuss.elastic.co/t/syslog-input-going-to-metadata-beat-2019-05-28/182980>\
**Category:** Logstash\
**Created:** [May 28, 2019, 4:17am UTC](https://discuss.elastic.co/t/syslog-input-going-to-metadata-beat-2019-05-28/182980 "2019-05-28T04:17:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tedder](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tedder/32/42460_2.png) [@tedder](https://discuss.elastic.co/u/tedder)\
**Post date:** [May 28, 2019, 4:17am UTC](https://discuss.elastic.co/t/syslog-input-going-to-metadata-beat-2019-05-28/182980/1 "2019-05-28T04:17:00Z")

</div>

I don't know what information is needed, but I've started sending syslog input into logstash (and therefore into ELK).

My input simply specifies a port, the filter contains the following:

```auto
filter {
  if [type] == "syslog" {
    grok {
      match => { "message" => "%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} %{DATA:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: %{GREEDYDATA:syslog_message}" }
      add_field => ["received_at", "%{@timestamp}"]
      add_field => ["received_from", "%{host}"]
    }
    syslog_pri {
    }
    date {
      match => ["syslog_timestamp", "MMM d HH:mm:ss", "MMM dd HH:mm:ss"]
    }
  }
}

```

I then added the following to `syslog_pri`:

```auto
    syslog_pri {
      add_field => { "[@metadata][type]" => "syslog" }
      add_field => { "[@metadata][beat]" => "syslog" }

```

Here's what the output looks like:

```auto
output {
  elasticsearch {
    hosts => ["localhost"]
    manage_template => false
    index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
    http_compression => true
    sniffing => true
    sniffing_delay => 20
  }
}

```

Neither of those syslog\_pri options seem to have helped. It doesn't have any \_grokparsefailure, but it has syslog-ish fields like facility and severity, so I assume it is being picked up and being filtered, it's just that the output index is literally the string `"%{[@metadata][beat]}-2019.05.28"`.

I left the date in to make it clear I'm not scrubbing it in any way- that's literally the index name.

---

<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:** [June 25, 2019, 4:17am UTC](https://discuss.elastic.co/t/syslog-input-going-to-metadata-beat-2019-05-28/182980/2 "2019-06-25T04:17:01Z")

</div>

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