Enabling NGINX monitoring

For configuration of the NGINX monitoring, /etc/nginx/nginx.conf file needs to be updated as stated in our documentation here

If something is not correctly configured, this warning will show up in the UI, when you open the NGINX process:


Or warning like this in agent logs:

WARN | nstana-sensor-scheduler-thread-4 | Nginx | com.instana.sensor-nginx - 1.1.75 | Could not find Status URL in /etc/nginx/nginx.conf. Is it enabled?

Warning in the logs for NGINX Plus monitoring:

WARN | nstana-sensor-scheduler-thread-4 | Nginx | com.instana.sensor-nginx - 1.1.75 | Could not find Api URL in /etc/nginx/nginx.conf. Is it enabled?

So in these cases, it is clear that the Instana agent either can't find nginx.conf file or it is not recognizing the parts of the file needed for enabling of NGINX monitoring. Instana agent will first try to parse config and prefix args defined within nginx process (-c and -p parameters) and in case there are no parameters present it will fallback to /etc/nginx/nginx.conf.

Keep in mind that location /api and location /nginx_status parts should be inside http {} part of the nginx.conf file, with separate server {} for Instana, preferably that server should be the first inside http tag (this is stated in our Nginx docs: make sure that the module is enabled/available and add the following at the beginning of your NGINX configuration).

Have more questions? Submit a request


  • Avatar
    Daniel Regli1

    hi Djordie Djuric,

    I am trying to get the nginx monitoring working for an on premise installation of gitlab. There you can enable the status endpoint by configuration (https://docs.gitlab.com/omnibus/settings/nginx.html#enablingdisabling-nginx_status) but two things differ from a regular nginx config.

    1. it's included via file in the main nginx.conf http via include /var/opt/gitlab/nginx/conf/nginx-status.conf;
    2. it's defined on a different port
    server {
    listen *:8060;
    server_name localhost;
    location /nginx_status {
    server_tokens on;
    access_log off;
    allow all;

    For now I am not able to configure instana to get it working. Do you know if there is a configuration to tell instana to pick up that location?

    Thanks & Cheers

    Edited by Daniel Regli1
  • Avatar
    Gilles Treguer

    Hello, I have the same case in our Company, Is there a meaning to interpret include configuration (stub_status) for nginx status ?