首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >包括Instana中GitLab安装的nginx指标

包括Instana中GitLab安装的nginx指标
EN

Stack Overflow用户
提问于 2019-07-31 14:00:42
回答 1查看 300关注 0票数 1

我在使用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。文件内容似乎也很好。

代码语言:javascript
复制
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?提前感谢各位并致以最良好的问候。塞巴斯蒂安

EN

回答 1

Stack Overflow用户

发布于 2020-04-01 16:46:26

您可以删除该服务器中的位置/nginx_status,并添加如下新的服务器部分:

代码语言:javascript
复制
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;
    }
}
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57292600

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档