# Creating alert using API heartbeat endpoint

**URL:** <https://discuss.elastic.co/t/creating-alert-using-api-heartbeat-endpoint/296693>\
**Category:** Kibana\
**Tags:** elastic-stack-alerting\
**Created:** [February 9, 2022, 8:47am UTC](https://discuss.elastic.co/t/creating-alert-using-api-heartbeat-endpoint/296693 "2022-02-09T08:47:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![eddieyee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eddieyee/32/98119_2.png) [@eddieyee](https://discuss.elastic.co/u/eddieyee)\
**Post date:** [February 9, 2022, 8:47am UTC](https://discuss.elastic.co/t/creating-alert-using-api-heartbeat-endpoint/296693/1 "2022-02-09T08:47:24Z")

</div>

Hi I have a few API heartbeat endpoint to check the API service is running fine.

Is it possible to create alerts on these heartbeat?

---

<div class="post-metadata">

**Author:** ![gmmorris](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gmmorris/32/72624_2.png) [@gmmorris](https://discuss.elastic.co/u/gmmorris)\
**Post date:** [February 9, 2022, 9:10am UTC](https://discuss.elastic.co/t/creating-alert-using-api-heartbeat-endpoint/296693/2 "2022-02-09T09:10:52Z")

</div>

Hi @eddieyee ,  
In theory, this should be possible, but it depends on a variety of things, so we'd likely need more information to say for sure.

Does each heartbeat correlate to a document?  
Are you trying to detect something in this document, or are you trying to detect the absence of a document?  
Can you fashion an ES query that would detect the condition you're looking for? Or are you unsure about how to achieve that?

---

<div class="post-metadata">

**Author:** ![eddieyee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eddieyee/32/98119_2.png) [@eddieyee](https://discuss.elastic.co/u/eddieyee)\
**Post date:** [February 10, 2022, 8:11am UTC](https://discuss.elastic.co/t/creating-alert-using-api-heartbeat-endpoint/296693/3 "2022-02-10T08:11:09Z")

</div>

Hi @gmmorris, thanks for looking into this.

It is possible to create alert off this web API heartbeat endpoint directly without any document?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 10, 2022, 8:27am UTC](https://discuss.elastic.co/t/creating-alert-using-api-heartbeat-endpoint/296693/4 "2022-02-10T08:27:26Z")

</div>

No, it's not as Heartbeat doesn't have an API.

---

<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:** [March 10, 2022, 8:28am UTC](https://discuss.elastic.co/t/creating-alert-using-api-heartbeat-endpoint/296693/5 "2022-03-10T08:28:00Z")

</div>

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