health_check unusable as of self-changing token
Summary
The new feature https://Git.Lab.FQDN/health_check is a cool idea but has only worked for some minutes with my nagios. Why? The URL now only reports a 404-Error. After research I noticed the token changes itself...
Steps to reproduce
I set up nagios to check for status code 200 on https://Git.Lab.FQDN/health_check as well as the single service urls. first I used the header to authenticate. after my first error I used ?token=... After some minutes it was not working anymore. I got a 404. So I went over and replaced the token in my nagios setup: Success! It works again. Now after lunch: 404... Researched and noticed that the token has changed again.
Expected behavior
The token should only change when clicking the button (and probably even entering about one thousand security answers?)
Relevant logs and/or screenshots
No known logs
Output of checks
Results of GitLab Application Check
Checking GitLab Shell ...
GitLab Shell version >= 2.7.2 ? ... OK (2.7.2)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
hooks directories in repos are links: ...
3/1 ... ok
4/4 ... ok
1/5 ... ok
4/6 ... repository is empty
4/7 ... ok
1/8 ... ok
5/9 ... ok
1/10 ... ok
7/11 ... ok
1/12 ... ok
9/13 ... ok
11/14 ... ok
15/15 ... ok
15/16 ... ok
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Check directories and files:
/opt/gitlab-data/repositories: OK
/var/opt/gitlab/.ssh/authorized_keys: OK
Test redis-cli executable: redis-cli 2.8.24
Send ping to redis server: PONG
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
Reply by email is disabled in config/gitlab.yml
Checking Reply by email ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured with autocrlf=input? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory setup correctly? ... no
Try fixing it:
sudo chown -R git /var/opt/gitlab/gitlab-rails/uploads
sudo find /var/opt/gitlab/gitlab-rails/uploads -type f -exec chmod 0644 {} \;
sudo find /var/opt/gitlab/gitlab-rails/uploads -type d -not -path /var/opt/gitlab/gitlab-rails/uploads -exec chmod 0700 {} \;
For more information see:
doc/install/installation.md in section "GitLab"
Please fix the error above and rerun the checks.
Init script exists? ... skipped (omnibus-gitlab has no init script)
Init script up-to-date? ... skipped (omnibus-gitlab has no init script)
projects have namespace: ...
3/1 ... yes
4/4 ... yes
1/5 ... yes
4/6 ... yes
4/7 ... yes
1/8 ... yes
5/9 ... yes
1/10 ... yes
7/11 ... yes
1/12 ... yes
9/13 ... yes
11/14 ... yes
15/15 ... yes
15/16 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.1.0 ? ... yes (2.1.8)
Your git bin path is "/opt/gitlab/embedded/bin/git"
Git version >= 2.7.3 ? ... yes (2.7.4)
Active users: 10
Checking GitLab ... Finished
Results of GitLab Environment Info
System information
System: Debian 8.4
Current User: git
Using RVM: no
Ruby Version: 2.1.8p440
Gem Version: 2.5.1
Bundler Version:1.10.6
Rake Version: 10.5.0
Sidekiq Version:4.1.2
GitLab information
Version: 8.8.1
Revision: 9b9e320
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL: https://*removed*/
HTTP Clone URL: https://*removed*/some-group/some-project.git
SSH Clone URL: git@*removed*:some-group/some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 2.7.2
Repositories: /opt/gitlab-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks/
Git: /opt/gitlab/embedded/bin/git
Possible fixes
Sorry no idea...