# Calculating percentage and alerting through email

**URL:** <https://discuss.elastic.co/t/calculating-percentage-and-alerting-through-email/227664>\
**Category:** Kibana\
**Created:** [April 12, 2020, 10:12am UTC](https://discuss.elastic.co/t/calculating-percentage-and-alerting-through-email/227664 "2020-04-12T10:12:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rcganesh](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@rcganesh](https://discuss.elastic.co/u/rcganesh)\
**Post date:** [April 12, 2020, 10:12am UTC](https://discuss.elastic.co/t/calculating-percentage-and-alerting-through-email/227664/1 "2020-04-12T10:12:03Z")

</div>

Hello,

I need some inputs on how to achieve below points through Kibana.

We are injecting data into Elasticsearch from MQ application. One of the fields in thedata is "Status". This field can be either "SUCCESS" or "FAIL". In Kiban, I can easily create a graph based on COUNT, say count of "SUCCESS" in last 10 minutes, count of "FAIL" in last 1 hour or total count in last 24 hours.

What I am looking for is,

1. How can I show in a graph the percentage of "SUCCESS" and "FAIL" for the last 5 minutes or a day?

2. Is there any possible way to send an email notification when percentage of "SUCCESS" or "FAIL" is above 50 for, say, last 15 minutes?

Any help or inputs in this regard is really appreciated.

Thank you.  
Ravi Chandran.

---

<div class="post-metadata">

**Author:** ![lukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas/32/6812_2.png) [@lukas](https://discuss.elastic.co/u/lukas)\
**Post date:** [April 14, 2020, 10:34pm UTC](https://discuss.elastic.co/t/calculating-percentage-and-alerting-through-email/227664/2 "2020-04-14T22:34:43Z")

</div>

Unfortunately we don't currently have support for scripted metrics, or ratios of this sort.

---

<div class="post-metadata">

**Author:** ![rcganesh](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@rcganesh](https://discuss.elastic.co/u/rcganesh)\
**Post date:** [April 16, 2020, 10:51am UTC](https://discuss.elastic.co/t/calculating-percentage-and-alerting-through-email/227664/3 "2020-04-16T10:51:08Z")

</div>

@lukas, Thank you for the reply.

As a work around we decided to use logstash and Grafana.

Best regards,  
Ravi Chandran

---

<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 14, 2020, 10:51am UTC](https://discuss.elastic.co/t/calculating-percentage-and-alerting-through-email/227664/4 "2020-05-14T10:51:25Z")

</div>

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