# How to configure metric threshold using elastic query

**URL:** <https://discuss.elastic.co/t/how-to-configure-metric-threshold-using-elastic-query/301307>\
**Category:** Kibana\
**Created:** [April 1, 2022, 10:20am UTC](https://discuss.elastic.co/t/how-to-configure-metric-threshold-using-elastic-query/301307 "2022-04-01T10:20:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![waelboss](https://avatars.discourse-cdn.com/v4/letter/w/34f0e0/32.png) [@waelboss](https://discuss.elastic.co/u/waelboss)\
**Post date:** [April 1, 2022, 10:20am UTC](https://discuss.elastic.co/t/how-to-configure-metric-threshold-using-elastic-query/301307/1 "2022-04-01T10:20:41Z")

</div>

i want to create a metric threshold using the elastic query that calculate the percentage rate between Max value filed and Current value field and fire the alert when the rate \>= 90%  
could you please help to write the query ?

---

<div class="post-metadata">

**Author:** ![waelboss](https://avatars.discourse-cdn.com/v4/letter/w/34f0e0/32.png) [@waelboss](https://discuss.elastic.co/u/waelboss)\
**Post date:** [April 4, 2022, 8:27am UTC](https://discuss.elastic.co/t/how-to-configure-metric-threshold-using-elastic-query/301307/2 "2022-04-04T08:27:00Z")

</div>

Any 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:** [May 2, 2022, 8:27am UTC](https://discuss.elastic.co/t/how-to-configure-metric-threshold-using-elastic-query/301307/3 "2022-05-02T08:27:58Z")

</div>

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