# Heartbeat showing application as down even when its up

**URL:** <https://discuss.elastic.co/t/heartbeat-showing-application-as-down-even-when-its-up/185402>\
**Category:** Beats\
**Tags:** heartbeat\
**Created:** [June 12, 2019, 11:53am UTC](https://discuss.elastic.co/t/heartbeat-showing-application-as-down-even-when-its-up/185402 "2019-06-12T11:53:56Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![sjabiulla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sjabiulla/32/48429_2.png) [@sjabiulla](https://discuss.elastic.co/u/sjabiulla)\
**Post date:** [June 12, 2019, 11:53am UTC](https://discuss.elastic.co/t/heartbeat-showing-application-as-down-even-when-its-up/185402/1 "2019-06-12T11:53:56Z")

</div>

Hi,

I have an application URL 1 that redirects to a different URL 2. From browser when I hit URL 1 , it redirects me to URL 2 and in network I can see that URL 1 returns response code as 302 as its redirecting to URL 2. But when I monitor URL 1 using heartbeat, heartbeat is showing as 404. Please assist !

NOTE: I was able to ping the host of URL 1 as well from CMD prompt.

---

<div class="post-metadata">

**Author:** ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)\
**Post date:** [June 14, 2019, 1:58pm UTC](https://discuss.elastic.co/t/heartbeat-showing-application-as-down-even-when-its-up/185402/2 "2019-06-14T13:58:53Z")

</div>

Can you access the host via curl? If it's a 404 there's something about the way the app is reacting to heartbeat that is different. It could also be an issue where the URL needs you to be logged in or have a special header.

---

<div class="post-metadata">

**Author:** ![sjabiulla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sjabiulla/32/48429_2.png) [@sjabiulla](https://discuss.elastic.co/u/sjabiulla)\
**Post date:** [June 14, 2019, 2:30pm UTC](https://discuss.elastic.co/t/heartbeat-showing-application-as-down-even-when-its-up/185402/3 "2019-06-14T14:30:39Z")

</div>

Yes, I'm able to access the URL via curl and getting 302 as expected. Getting 404 only via heartbeat.

---

<div class="post-metadata">

**Author:** ![sjabiulla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sjabiulla/32/48429_2.png) [@sjabiulla](https://discuss.elastic.co/u/sjabiulla)\
**Post date:** [June 17, 2019, 5:18am UTC](https://discuss.elastic.co/t/heartbeat-showing-application-as-down-even-when-its-up/185402/4 "2019-06-17T05:18:15Z")

</div>

@Andrew_Cholakian1 Can you please assist with this !

---

<div class="post-metadata">

**Author:** ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)\
**Post date:** [June 17, 2019, 5:44pm UTC](https://discuss.elastic.co/t/heartbeat-showing-application-as-down-even-when-its-up/185402/5 "2019-06-17T17:44:57Z")

</div>

I suspect you'll need to debug this from the application side. There must be some logic in the application that is causing it to return a 404 due to some input parameter.

---

<div class="post-metadata">

**Author:** ![sjabiulla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sjabiulla/32/48429_2.png) [@sjabiulla](https://discuss.elastic.co/u/sjabiulla)\
**Post date:** [June 18, 2019, 7:15am UTC](https://discuss.elastic.co/t/heartbeat-showing-application-as-down-even-when-its-up/185402/6 "2019-06-18T07:15:49Z")

</div>

Since I'm not getting any issue when I do curl, do you think it's still an issue with the application that's making it to return 404 ?

---

<div class="post-metadata">

**Author:** ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)\
**Post date:** [June 18, 2019, 12:33pm UTC](https://discuss.elastic.co/t/heartbeat-showing-application-as-down-even-when-its-up/185402/7 "2019-06-18T12:33:06Z")

</div>

Yes. Some sites (including [discuss.elastic.co](http://discuss.elastic.co)) block unexpected user agents like heartbeat.

At any rate it's impossible to debug without seeing both sides of the connection. If you do find that is definitively a heartbeat bug please let us know.

---

<div class="post-metadata">

**Author:** ![sjabiulla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sjabiulla/32/48429_2.png) [@sjabiulla](https://discuss.elastic.co/u/sjabiulla)\
**Post date:** [June 18, 2019, 12:39pm UTC](https://discuss.elastic.co/t/heartbeat-showing-application-as-down-even-when-its-up/185402/8 "2019-06-18T12:39:18Z")

</div>

thanks for the info.

I will try to debug with the application team who owns that URL and will provide the feedback.

FYI.. As an alternative, I tried http\_poller input plugin in Logstash and still facing the similar [issue](https://discuss.elastic.co/t/http-poller-not-able-to-handle-302/186239).

---

<div class="post-metadata">

**Author:** ![EZprogramming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ezprogramming/32/57291_2.png) [@EZprogramming](https://discuss.elastic.co/u/EZprogramming)\
**Post date:** [June 18, 2019, 4:27pm UTC](https://discuss.elastic.co/t/heartbeat-showing-application-as-down-even-when-its-up/185402/9 "2019-06-18T16:27:35Z")

</div>

@sjabiulla, You can monitor the uptime in Kibana, have you tried that? It can tell if your application is up or down.

---

<div class="post-metadata">

**Author:** ![sjabiulla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sjabiulla/32/48429_2.png) [@sjabiulla](https://discuss.elastic.co/u/sjabiulla)\
**Post date:** [June 20, 2019, 6:45am UTC](https://discuss.elastic.co/t/heartbeat-showing-application-as-down-even-when-its-up/185402/10 "2019-06-20T06:45:14Z")

</div>

@Andrew_Cholakian1  
Could you please provide the exact user agent name that HeartBeat uses to check the URL's ?

---

<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:** [July 18, 2019, 6:56am UTC](https://discuss.elastic.co/t/heartbeat-showing-application-as-down-even-when-its-up/185402/11 "2019-07-18T06:56:53Z")

</div>

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