1

I'm having some trouble monitoring my GitLab installation with Instana. GitLab and the nginx shipped with it are running fine, only monitoring does not work.

Instana recognises the nginx but cannot get any information because it cannot pick up data from the /nginx_status location.

I added my additional configuration for /nginx_status to /etc/gitlab/gitlab.rb and installed it using gitlab-ctl reconfigure (just as the gitlab docs say). And basically gitlab works fine and exposes the status page http://git-test:9999/nginx_status.

My config file /var/opt/gitlab/nginx/conf/nginx.conf now has an additional include for /var/opt/gitlab/nginx/conf/nginx-status.conf at its end. The file contents seem fine as well.

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;
    }
}

My problem now is that instana is not picking up the information exposed via /nginx_status stating that nginx needs configuration.

Status URL not found. The nginx config file was parsed and no stub_status direction could be found. This directive needs to be configured in order to gather nginx metrics. The following snippet shows how to configure stub_status within an nginx config file.

To me it seems that instana is not following the include and hence not pickung up the configuration from /var/opt/gitlab/nginx/conf/nginx-status.conf. So basically instana has no clue about the information it asks for.

Does anyone of you know how I can feed these status information to instana? Thanks in advance guys and best regards. Sebastian

  • The agent debug logs will likely include some hints as to why the nginx sensor is not picking up the configured location. However, please open a case with our official support at https://support.instana.com. Thanks. – Gordon Aug 06 '19 at 08:26

1 Answers1

1

You could remove the location /nginx_status in that server, and add a new server section like this:

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;
    }
}
Luis Sánchez
  • 121
  • 1
  • 6