# How to tag log files in filebeat for logstash ingestion?

**URL:** <https://discuss.elastic.co/t/how-to-tag-log-files-in-filebeat-for-logstash-ingestion/44713>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [March 17, 2016, 1:54pm UTC](https://discuss.elastic.co/t/how-to-tag-log-files-in-filebeat-for-logstash-ingestion/44713 "2016-03-17T13:54:18Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![jclose](https://avatars.discourse-cdn.com/v4/letter/j/df705f/32.png) [@jclose](https://discuss.elastic.co/u/jclose)\
**Post date:** [March 18, 2016, 1:58pm UTC](https://discuss.elastic.co/t/how-to-tag-log-files-in-filebeat-for-logstash-ingestion/44713/6 "2016-03-18T13:58:44Z")

</div>

Digging deeper, it seems like I should be able to say:

```
type => "%{[@metadata][log_type]}"

```

or would it be

```
type =>"%{[log_type]}"

```

Or if I were trying to use the source field, using:

```
type => "%{[@metadata][source]}"

```

Does that look right? Is that how I would access a field within logstash, so that I can appropriately type the data within the input?

---

_[View the full topic](https://discuss.elastic.co/t/how-to-tag-log-files-in-filebeat-for-logstash-ingestion/44713)._
