# Metrics is not executuing in logstash

**URL:** <https://discuss.elastic.co/t/metrics-is-not-executuing-in-logstash/149120>\
**Category:** Logstash\
**Created:** [September 19, 2018, 11:44am UTC](https://discuss.elastic.co/t/metrics-is-not-executuing-in-logstash/149120 "2018-09-19T11:44:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KrishnaBrata\_Mondal](https://avatars.discourse-cdn.com/v4/letter/k/43a26b/32.png) [@KrishnaBrata\_Mondal](https://discuss.elastic.co/u/KrishnaBrata_Mondal)\
**Post date:** [September 19, 2018, 11:44am UTC](https://discuss.elastic.co/t/metrics-is-not-executuing-in-logstash/149120/1 "2018-09-19T11:44:56Z")

</div>

Hi All,  
I am very new in ELK, I have configured the logstash config file where I have below code cnipped configurred to implement and trigger email when a threshold crossed. To get this done I used mertic but its not executing... please see below:

filter{  
...  
if "Invalid sm\_usergroups" in [message] {  
metrics {  
meter =\> ["Invalid sm\_usergroups"]  
add\_tag =\> "metric"  
}  
}

output{  
if "metric" in [tags] { // this itself is not working, after this need to implement threshold  
stdout {  
codec =\> line {  
format =\> "Output from Metric."  
}  
}  
email {  
.....  
}  
}

Please Note: I am using ELK-5.5.0, version can not be updated as already existing implementation is there in place. I have to use this version only.  
Please help.

---

<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:** [October 17, 2018, 11:44am UTC](https://discuss.elastic.co/t/metrics-is-not-executuing-in-logstash/149120/2 "2018-10-17T11:44:56Z")

</div>

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