# About pipeline rules and metrics (\`metric\_counter\_inc\` etc.)

**URL:** <https://community.graylog.org/t/about-pipeline-rules-and-metrics-metric-counter-inc-etc/17583>\
**Category:** Graylog Central (peer support)\
**Tags:** pipeline-rules\
**Created:** [October 21, 2020, 11:45am UTC](https://community.graylog.org/t/about-pipeline-rules-and-metrics-metric-counter-inc-etc/17583 "2020-10-21T11:45:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![maniel](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/maniel/32/58_2.png) [@maniel](https://community.graylog.org/u/maniel)\
**Post date:** [October 21, 2020, 11:45am UTC](https://community.graylog.org/t/about-pipeline-rules-and-metrics-metric-counter-inc-etc/17583/1 "2020-10-21T11:45:42Z")

</div>

Hi  
I’m using a pipeline rule to delete some messages, but i want to kinda keep track of those messages occurrences. Is there any way to sum up occurrences and generate a message with something like “there was X occurrences of Y message in past Z minutes”? i found a `metric_counter_inc` function i could place in the rule, it increments a simple metric counter, what about resetting it periodically? i mean i could check the metric each rule invocation, generate a message if it passes a given threshold and reset it, is there any way to do it?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)\
**Post date:** [November 4, 2020, 11:45am UTC](https://community.graylog.org/t/about-pipeline-rules-and-metrics-metric-counter-inc-etc/17583/2 "2020-11-04T11:45:44Z")

</div>

Closed on November 4, 2020, 11:45am UTC

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