# Add\_tag failed

**URL:** <https://discuss.elastic.co/t/add-tag-failed/267281>\
**Category:** Logstash\
**Created:** [March 15, 2021, 3:11pm UTC](https://discuss.elastic.co/t/add-tag-failed/267281 "2021-03-15T15:11:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christophe\_Dumont](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christophe_dumont/32/82868_2.png) [@Christophe\_Dumont](https://discuss.elastic.co/u/Christophe_Dumont)\
**Post date:** [March 15, 2021, 3:11pm UTC](https://discuss.elastic.co/t/add-tag-failed/267281/1 "2021-03-15T15:11:18Z")

</div>

Hello,

I want to ship logs from different log source. I need to add a tag to each different log sources.  
This conf doesn' t work !

input {  
beats {  
port =\> 5044  
}  
}

filter {  
if [source]=="xxx.log" {  
mutate {  
add\_tag =\> ["Gvrs"]  
}  
}  
if [source]=="xxx.log" {  
mutate {  
add\_tag =\> "Demo"  
}  
}  
}

output {  
gelf {  
host =\> "xxx.xxx.xxx.xxx"  
port =\> 5044  
protocol =\> "udp"  
}  
}

---

<div class="post-metadata">

**Author:** ![RLPowellJr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rlpowelljr/32/97049_2.png) [@RLPowellJr](https://discuss.elastic.co/u/RLPowellJr)\
**Post date:** [March 17, 2021, 7:27pm UTC](https://discuss.elastic.co/t/add-tag-failed/267281/2 "2021-03-17T19:27:52Z")

</div>

When you say it doesn't work, is the add\_tag just not adding the tag, or is it generating an error? Either way, have you tried making the tags lower-case (that is, "gvrs" and "demo")?

---

<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:** [April 14, 2021, 7:28pm UTC](https://discuss.elastic.co/t/add-tag-failed/267281/3 "2021-04-14T19:28:05Z")

</div>

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