# Get analytics with potential alerts if anomalies detected

**URL:** <https://discuss.elastic.co/t/get-analytics-with-potential-alerts-if-anomalies-detected/343177>\
**Category:** Elasticsearch\
**Created:** [September 16, 2023, 12:38pm UTC](https://discuss.elastic.co/t/get-analytics-with-potential-alerts-if-anomalies-detected/343177 "2023-09-16T12:38:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![O\_K](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/o_k/32/52424_2.png) [@O\_K](https://discuss.elastic.co/u/O_K)\
**Post date:** [September 16, 2023, 12:38pm UTC](https://discuss.elastic.co/t/get-analytics-with-potential-alerts-if-anomalies-detected/343177/1 "2023-09-16T12:38:39Z")

</div>

I'm researching options how to get some analytics, for instance, I want to look into ERRORs in log\_level column, and if its amount increases drastically, I want to receive an alert. There should be many such cases and it would be preferable to see such details in kibana as well (but not mandatory). I'm thinking to write for this purpose some python app, but a bit struggling regarding starting point. Probably you could guide me from what should I start? Already checked

- lib elasticsearch-py
- async-searches in elastic [Long-running searches | Elasticsearch Guide [8.9] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search-intro.html)
- anomaly detection [Anomaly detection | Kibana Guide [8.9] | Elastic](https://www.elastic.co/guide/en/kibana/current/xpack-ml-anomalies.html)

Any advice regarding enhanced analytics and alertins would be helpful.

---

<div class="post-metadata">

**Author:** ![Andrew\_Mora](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_mora/32/125622_2.png) [@Andrew\_Mora](https://discuss.elastic.co/u/Andrew_Mora)\
**Post date:** [September 16, 2023, 12:56pm UTC](https://discuss.elastic.co/t/get-analytics-with-potential-alerts-if-anomalies-detected/343177/2 "2023-09-16T12:56:02Z")

</div>

Starting with Python, you can use the Elasticsearch Python library to query and monitor the log data. For enhanced analytics and alerts, consider exploring Elasticsearch's built-in anomaly detection features and integrating Kibana for a comprehensive solution. AC Football Cases

---

<div class="post-metadata">

**Author:** ![O\_K](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/o_k/32/52424_2.png) [@O\_K](https://discuss.elastic.co/u/O_K)\
**Post date:** [September 16, 2023, 1:02pm UTC](https://discuss.elastic.co/t/get-analytics-with-potential-alerts-if-anomalies-detected/343177/3 "2023-09-16T13:02:27Z")

</div>

I need to have free solution, so I guess Elastic anomaly detection solution isn't preferrable

---

<div class="post-metadata">

**Author:** ![O\_K](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/o_k/32/52424_2.png) [@O\_K](https://discuss.elastic.co/u/O_K)\
**Post date:** [September 17, 2023, 2:50am UTC](https://discuss.elastic.co/t/get-analytics-with-potential-alerts-if-anomalies-detected/343177/4 "2023-09-17T02:50:57Z")

</div>

how can I run queries on elastic side with python?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 17, 2023, 3:44am UTC](https://discuss.elastic.co/t/get-analytics-with-potential-alerts-if-anomalies-detected/343177/5 "2023-09-17T03:44:03Z")

</div>

Perhaps look at this there is a python client for elastic

> **[Elasticsearch Python Client \[8.9\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/index.html)**

---

<div class="post-metadata">

**Author:** ![pestevao](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pestevao/32/44138_2.png) [@pestevao](https://discuss.elastic.co/u/pestevao)\
**Post date:** [September 17, 2023, 11:20am UTC](https://discuss.elastic.co/t/get-analytics-with-potential-alerts-if-anomalies-detected/343177/6 "2023-09-17T11:20:31Z")

</div>

Try to see elastalert2 - [GitHub - jertel/elastalert2: ElastAlert 2 is a continuation of the original yelp/elastalert project. Pull requests are appreciated!](https://github.com/jertel/elastalert2)

---

<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 15, 2023, 11:21am UTC](https://discuss.elastic.co/t/get-analytics-with-potential-alerts-if-anomalies-detected/343177/7 "2023-10-15T11:21:05Z")

</div>

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