Gitlab Omnibus 中没有 Prometheus

Gitlab Omnibus 中没有 Prometheus

设置:Ubuntu 14.04,包含所有最新更新,

Gitlab Omnibus 版本 11.7.3(最新)

~$ sudo grep prometheus /etc/gitlab/gitlab.rb

prometheus_monitoring['enable'] = true
prometheus['enable'] = true
prometheus['listen_address'] = ':9090'

问题 - 浏览器无法连接到http://本地主机:9090,且日志为空。

$ curl http://localhost:9090
curl: (7) Failed to connect to localhost port 9090: Connection refused

$ sudo gitlab-ctl tail prometheus
==> /var/log/gitlab/prometheus/state <==

==> /var/log/gitlab/prometheus/current <==

sudo netstat -tunlp不显示端口 9090

然而prometheus进程好像正在运行:

$ ps ax | grep prometheus
 1358 ?        Ss     6:32 runsv prometheus
 1377 ?        S      0:35 svlogd -tt /var/log/gitlab/prometheus
 6935 ?        Ssl    0:02 /opt/gitlab/embedded/bin/gitlab-workhorse -listenNetwork unix -listenUmask 0 -listenAddr /var/opt/gitlab/gitlab-workhorse/socket -authBackend http://localhost:8080 -authSocket /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket -documentRoot /opt/gitlab/embedded/service/gitlab-rails/public -pprofListenAddr  -prometheusListenAddr localhost:9229 -secretPath /opt/gitlab/embedded/service/gitlab-rails/.gitlab_workhorse_secret -config config.toml
25394 pts/0    S+     0:00 grep --color=auto prometheus

忘记添加,与 Gitlab 捆绑的 nginx 已禁用。我使用另一个 nginx,从存储库安装。

还尝试重新启动 prometheus - 没有成功。

~$ sudo gitlab-ctl restart prometheus
ok: run: prometheus: (pid 32380) 0s

~$ curl -I http://localhost:9090
curl: (7) Failed to connect to localhost port 9090: Connection refused

更新。

但是现在 prometheus 日志不是空的!不知何故它的组被删除了。

答案1

重启后,prometheus 日志不为空!不知怎么的,组gitlab-prometheus被删除了。恢复组后,一切正常。

相关内容