I run Gitlab 9.5 from a Docker image. The settings has a check box to enable these metrics, but states that the “Environment variable prometheus_multiproc_dir does not exist or is not pointing to a valid directory.”.
I stopped, removed and restarted the Docker container using -e prometheus_multiproc_dir=/tmp - this seemed to have 0 effect; the warning persists. I tried a number of different directories; warning still persists. I logged in to the gitlab container and echo’d out $prometheus_multiproc_dir and it shows the directory I set. The environment variable is definitely there.
When I access /-/metrics, I get a 404. This might be because nothing is running to provide the metrics as even with the checkbox on, it seems to do nothing as long as this warning persists.
What am I missing here? How am I supposed to set this environment variable? I also tried to set it in gitlab_rails[‘prometheus_multiproc_dir’] - also to no avail.
I just set "config.multiprocess_files_dir = ‘/tmp’ in /opt/gitlab/embedded/service/gitlab-rails/config/initializers/7_promethesus_metrics.rb and did a restart without doing a reconfigure.
Hi @Fahr, looks like the prometheus_multiproc_dir should be added as an ENV variable for gitlab. When working in docker using docker-compose these options can be set in the docker-compose.yml file like this:
@shehzi - thanks! This option actually worked. I think some documentation to this end might be in place; far too many places to set all sorts of variables now… especially for Docker.