# Add tags in filebeat modules

**URL:** https://discuss.elastic.co/t/add-tags-in-filebeat-modules/261014
**Category:** Beats
**Tags:** filebeat
**Created:** [January 13, 2021, 3:01pm UTC](https://discuss.elastic.co/t/add-tags-in-filebeat-modules/261014 "2021-01-13T15:01:40Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![vasilev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vasilev/32/81983_2.png) [@vasilev](https://discuss.elastic.co/u/vasilev)
#### Post date: [January 13, 2021, 3:01pm UTC](https://discuss.elastic.co/t/add-tags-in-filebeat-modules/261014/1 "2021-01-13T15:01:40Z")

</div>

Hello,  
I have read this information:

> [@How to send different logs files to different logstash ports](https://discuss.elastic.co/t/how-to-send-different-logs-files-to-different-logstash-ports/95781):
>
> I am trying to send different log files on different logstash ports on logstash ..like one on 5044 and other on 5043 Here is my filebeat config . can someone help #=========================== Filebeat prospectors ============================= filebeat.prospectors: - input\_type: log # Paths that should be crawled and fetched. Glob based paths. paths: - /etc/filebeat/download.2017-06-16-1125-1224.log # tail\_files: true multiline.pattern: '^\[[0-9]{4}-[0-9]{2}-[0-9]{2}' multiline…

Can I add a tag in ibmmq module ? tried with:

```
 errorlog:
    enabled: true
    var.paths: ["/var/mqm/qmgrs/*/errors/*.json"]
# json.tags: ibmmq
# tags: ["ibmmq", json]

```

and after that in logstash:

```
filter {
# if "ibmmq" in [tags] {
     json {
        source => "message"
        target => "message"
     }
# }
}

```

Nothing is happening in this way.  
If I add # - all is fine..

thank you

---

<div class="post-metadata">

### Author: ![vasilev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vasilev/32/81983_2.png) [@vasilev](https://discuss.elastic.co/u/vasilev)
#### Post date: [January 14, 2021, 9:25am UTC](https://discuss.elastic.co/t/add-tags-in-filebeat-modules/261014/2 "2021-01-14T09:25:01Z")

</div>

I have added :

```
if [event][module] == "ibmmq" {
...
}

```

hopefully, this is the correct way - to read the fields from the incoming json.

---

<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: [February 11, 2021, 11:25am UTC](https://discuss.elastic.co/t/add-tags-in-filebeat-modules/261014/3 "2021-02-11T11:25:05Z")

</div>

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