# How to create a rule that compares two dynamic numbers

**URL:** <https://discuss.elastic.co/t/how-to-create-a-rule-that-compares-two-dynamic-numbers/281269>\
**Category:** Elastic Security\
**Tags:** elastic-stack-alerting, detection-rules\
**Created:** [August 12, 2021, 9:40pm UTC](https://discuss.elastic.co/t/how-to-create-a-rule-that-compares-two-dynamic-numbers/281269 "2021-08-12T21:40:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carrie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carrie/32/78413_2.png) [@Carrie](https://discuss.elastic.co/u/Carrie)\
**Post date:** [August 12, 2021, 9:40pm UTC](https://discuss.elastic.co/t/how-to-create-a-rule-that-compares-two-dynamic-numbers/281269/1 "2021-08-12T21:40:03Z")

</div>

Hi there, I am new to ELK. Currently I have 3 applications talking with each other. I want to check if the message actually gets sent.  
When the message gets sent or received, it will print out some logging  
For instance:  
App A will print out some logging containing “App A” and so on.  
I wanted to create a rule that counts the number of messages that containing “App A” /“App B” /“App C” and see if they are equal. However, I couldn’t find a way to do that.  
I am using filebeats and log stash for logging. Thanks in advance for your 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:** [September 9, 2021, 9:40pm UTC](https://discuss.elastic.co/t/how-to-create-a-rule-that-compares-two-dynamic-numbers/281269/2 "2021-09-09T21:40:59Z")

</div>

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