Skip to content

ci_runner_builds metric is missing docker-in-docker (dind) runner `11.3.0`

Using dind runner in kubernetes, with the image gitlab/gitlab-runner:latest.

Monitoring enabled on port 9252-

root@gitlab-runner-python-docker-compose-dind-gitlab-runner-7f85cscd:/# cat /etc/gitlab-runner/config.toml 
metrics_server = ":9252"
concurrent = 1
check_interval = 30

However, when a job is running-

Running with gitlab-runner 11.3.0 (d78e9e67)
  on gitlab-runner-python-docker-compose-dind-gitlab-runner-7f85cscd cde5ce51
Using Kubernetes namespace: gitlab
Using Kubernetes executor with image registry.mydomain.com/base-images/mybaseimage-dind:latest ...
Waiting for pod gitlab/runner-cde5ce51-project-53-concurrent-0nfqxs to be running, status is Pending
Waiting for pod gitlab/runner-cde5ce51-project-53-concurrent-0nfqxs to be running, status is Pending
Running on runner-cde5ce51-project-53-concurrent-0nfqxs via gitlab-runner-python-docker-compose-dind-gitlab-runner-7f85cscd...
Cloning repository...
...

and I exec into the runner container in kubernetes, the metric ci_runner_builds is missing-

kubectl -n gitlab exec -it gitlab-runner-python-docker-compose-dind-gitlab-runner-7f85cscd -- bash
root@gitlab-runner-python-docker-compose-dind-gitlab-runner-7f85cscd:/# curl -s http://localhost:9252/metrics | grep -i "^ci_runner_builds"
root@gitlab-runner-python-docker-compose-dind-gitlab-runner-7f85cscd:/#

However, this metric is visible on non-dind gitlab runners, running on an older version 10.3.0. What am I doing wrong here?

EDIT: I redeployed gitlab runners from version v10.3.0 to v10.9.0 and verified ci_runner_build metric was output by the /metrics endpoint from each of these runners. v11.0.0 and above seem to not output this metric.

Edited by G