# How get Health Check working

**URL:** <https://forums.suse.com/t/how-get-health-check-working/1005>\
**Category:** Rancher 1.x\
**Created:** [November 19, 2015, 8:56am UTC](https://forums.suse.com/t/how-get-health-check-working/1005 "2015-11-19T08:56:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![zauberertz](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/zauberertz/32/310_2.png) [@zauberertz](https://forums.suse.com/u/zauberertz)\
**Post date:** [November 19, 2015, 8:56am UTC](https://forums.suse.com/t/how-get-health-check-working/1005/1 "2015-11-19T08:56:50Z")

</div>

I have upgraded to rancher 0.46 and upgraded my Gitlab installation with Health Check bit it stays in this state:  
 ![](https://us1.discourse-cdn.com/flex022/uploads/suse/original/1X/656339c7ae33907e90b394bb5e5d2e05dec43431.png)

The Gitlab Container is properly working and I have checked with the Devtools of Firefox that its responding with 200 to the requested Url.

---

<div class="post-metadata">

**Author:** ![alena](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/alena/32/50_2.png) [@alena](https://forums.suse.com/u/alena)\
**Post date:** [November 25, 2015, 6:11pm UTC](https://forums.suse.com/t/how-get-health-check-working/1005/2 "2015-11-25T18:11:21Z")

</div>

@zauberertz Healthcheck works the following way: network-agents on hosts other than where Gitlbab container is deployed, perform health checks against Gitlab\_1 managed network ip address within Rancher managed ipsec network. Could you please check the following:

1. console in, or login to each network agent in the system.
2. Execute curl [http://10.42.94.79](http://10.42.94.79): and see if any of the requests result in non 200 response code.

If you get error code, it means that the managed network connectivity might not work cross hosts

---

<div class="post-metadata">

**Author:** ![zauberertz](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/zauberertz/32/310_2.png) [@zauberertz](https://forums.suse.com/u/zauberertz)\
**Post date:** [November 26, 2015, 9:02am UTC](https://forums.suse.com/t/how-get-health-check-working/1005/3 "2015-11-26T09:02:24Z")

</div>

For the case that I only request “curl [http://10.42.94.79](http://10.42.94.79)” I’ll get a redirect but if I “curl [http://10.42.94.79/users/sign\_in](http://10.42.94.79/users/sign_in)” I’ll get a html response.

Meanwhile the service turned green, so I assume its working, but my question was more in the direction how can I check that Health Checking is running / working?

Is there any log that could be checked?

---

<div class="post-metadata">

**Author:** ![alena](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/alena/32/50_2.png) [@alena](https://forums.suse.com/u/alena)\
**Post date:** [November 30, 2015, 6:08pm UTC](https://forums.suse.com/t/how-get-health-check-working/1005/4 "2015-11-30T18:08:34Z")

</div>

@zauberertz we are planning to add more API/UI support for health checks in the future release, here is the corresponding bug:

> <https://github.com/rancher/rancher/issues/2128>
>
> Currently when instances have health check enabled , there is no way to find out… the state reported by each of the hosts that are assigned to monitor instance's health.
> 
> It will be helpful to have this information presented in UI.

API would present following info:

- what hosts are performing health checks for the instance
- instance health state reported by each host for the instance

> > Is there any log that could be checked?

Today you can check health check reports in “cattle” database by executing following query:

> > select \* from service\_event where instance\_id=[your container id]

The query should return you health check state reported by each host (UP, DOWN, INIT)

---

<div class="post-metadata">

**Author:** ![morsoinferno](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@morsoinferno](https://forums.suse.com/u/morsoinferno)\
**Post date:** [March 19, 2017, 3:37pm UTC](https://forums.suse.com/t/how-get-health-check-working/1005/5 "2017-03-19T15:37:34Z")

</div>

Hi, can you share the configuration for healthcheck in gitlab? I’m trying to setup the hc with this config:

GET /users/sign\_in HTTP/1.0

but the container get stuck in initializing state and in a while the container die. I’m able to setup a tcp hc but not a http hc.

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [March 21, 2017, 2:22am UTC](https://forums.suse.com/t/how-get-health-check-working/1005/6 "2017-03-21T02:22:12Z")

</div>

The healthcheck port needs to be the internal port the container is running on, not the published port. Have you tried making that actual request? It’s possible the container doesn’t return a successful status for http 1.0 requests or similar.
