Health Check without token

I’ve got GitLab 10.5.6. I’d like to use Health Check information in my monitoring system. I can configure it by using Health Check endpoints with health check access token, but as this solution is depracated, I want to use IP whitelist. And I have some problems with it.

According to this article https://docs.gitlab.com/ee/administration/monitoring/ip_whitelist.html I edited /etc/gitlab/gitlab.rb and added this line (as this GitLab was installed around version 7 or even older I think):

gitlab_rails[‘monitoring_whitelist’] = [‘127.0.0.0/8’, ‘192.168.0.1’, ‘X.X.X.X’, ‘Y.Y.Y.Y’]

where X.X.X.X is IP of my computer and Y.Y.Y.Y is IP of server with GitLab. After it I executed reconfiguration (gitlab-ctl reconfigure). And started tests… Below logs are from production.log file.

Execution of curl http://127.0.0.1:8888/-/readiness on server Y.Y.Y.Y returns proper JSON with expected data:

Started GET “/-/readiness” for 127.0.0.1 at 2018-03-24 20:01:31 +0100
Processing by HealthController#readiness as /
Completed 200 OK in 27ms (Views: 0.6ms | ActiveRecord: 0.5ms)

Execution of curl http://Y.Y.Y.Y:8888/-/readiness on server Y.Y.Y.Y returns error:

Started GET “/-/readiness” for Y.Y.Y.Y at 2018-03-24 21:20:04 +0100
Processing by HealthController#readiness as /
Filter chain halted as :validate_ip_whitelisted_or_valid_token! rendered or redirected
Completed 404 Not Found in 2ms (Views: 1.0ms | ActiveRecord: 0.0ms)

Accessing address http://Y.Y.Y.Y:8888/-/readiness through Firefox browser on computer X.X.X.X returns error:

Started GET “/-/readiness” for X.X.X.X at 2018-03-24 20:03:04 +0100
Processing by HealthController#readiness as HTML
Filter chain halted as :validate_ip_whitelisted_or_valid_token! rendered or redirected
Completed 404 Not Found in 2ms (Views: 0.8ms | ActiveRecord: 0.0ms)

Accessing address http://Y.Y.Y.Y:8888/-/readiness?token=ZZZZZZZZZZZZZ through Firefox browser on computer X.X.X.X returns proper JSON with expected data.

I don’t have any idea what I can check more. Maybe there’s lack of any more configuration in /etc/gitlab/gitlab.rb as it’s quite old GitLab instance.

I will appreciate any help.

1 Like

hi,

i hope the below links will help.
https://docs.gitlab.com/ee/user/admin_area/monitoring/health_check.html

please reply and tell me which platform you are using, so it’ll easy for my to help you out

Thanks!

Hi Moreno,
Link you wrote doesn’t contain any more information than link to article I mentioned.

I use GitLab 10.5.6 CE which is installed on CentOS 6.8.