我在使用Instana监控我的GitLab安装时遇到了一些问题。GitLab及其附带的nginx运行良好,只有监视不起作用。
Instana识别nginx,但无法获得任何信息,因为它无法从/nginx_status位置获取数据。
我将/nginx_status的附加配置添加到/etc/ gitlab /gitlab.rb,并使用gitlab-ctl重新配置(正如gitlab文档所述)安装它。基本上,gitlab可以很好地工作,并公开状态页面status。
我的配置文件/var/opt/gitlab/nginx/conf/nginx.conf的末尾有一个额外的包含/var/opt/gitlab/nginx/conf/nginx-status.conf。文件内容似乎也很好。
server {
listen 10.51.13.169:9999;
server_name s00228862uv.ads.provinzial.com;
location /nginx_status {
stub_status;
server_tokens off;
access_log off;
allow all;
deny all;
stub_status on;
}
location /metrics {
vhost_traffic_status_display;
vhost_traffic_status_display_format prometheus;
server_tokens off;
access_log off;
allow all;
deny all;
stub_status on;
}
location /rails-metrics {
proxy_cache off;
proxy_pass http://gitlab-workhorse/-/metrics;
server_tokens off;
access_log off;
allow all;
deny all;
stub_status on;
}
}我现在的问题是instana没有获取通过/nginx_status公开的信息,说明nginx需要配置。
未找到状态URL。解析了nginx配置文件,找不到stub_status方向。为了收集nginx指标,需要配置此指令。下面的代码片段演示如何在nginx文件中配置stub_status。
在我看来,instana似乎没有遵循包含,因此没有从/var/opt/gitlab/nginx/conf/nginx-status.conf获取配置。所以基本上instana不知道它想要的信息。
你们谁知道我怎么能把这些状态信息提供给instana?提前感谢各位并致以最良好的问候。塞巴斯蒂安
发布于 2020-04-01 16:46:26
您可以删除该服务器中的位置/nginx_status,并添加如下新的服务器部分:
server {
listen 127.0.0.1:80;
server_name 127.0.0.1;
# Required by Instana
location /nginx_status {
stub_status on;
access_log off;
}
}https://stackoverflow.com/questions/57292600
复制相似问题