How To
Summary
Configuration steps Metrics for NGINX, including custom port.
Objective
Be able to configure Metrics for NGINX, which allows you to collect and monitor your NGINX processes.
Environment
This configuration is supported on any Instana installation, it could either be used on Docker, Kubernetes, Red Hat Openshift.
Steps
For NGINX metrics collection, Instana uses ngx_http_stub_status_module for remote metrics collection. To enable this collection, make sure that the module is enabled or available, and add the following snippet at the beginning of your NGINX configuration:
location /nginx_status {
listen 80; # If needed add a custom port, otherwise there is no need to add this line.
stub_status on;
access_log off;
allow 127.0.0.1; # Or the Remote IP of the Instana Host Agent
deny all;
}
By default, the Instana agent searches for the location of the configuration file in any available process arguments; otherwise, it fallbacks to
/etc/nginx/nginx.conf.Note: When the Instana agent runs in a Kubernetes cluster, make sure to allow the host IP address on which the agent is running by using the allow <host-ip-address> configuration.
Additional Information
If any additional changes are made to the NGINX metrics configuration and these metrics are not recognized.
If in case agent is not discovering data properly, you need to run the following commands.
sudo systemctl reload nginx # to reload NGINX configuration.
sudo systemctl restart nginx # to restart NGINX service.
sudo systemctl restart instana-agent # to restart instana-agent in case the service is not collecting data.
Related Information
Document Location
Worldwide
[{"Type":"MASTER","Line of Business":{"code":"LOB45","label":"Automation"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSE1JP5","label":"IBM Instana Observability"},"ARM Category":[{"code":"a8m3p000000UoUaAAK","label":"Application Perspectives \u0026 Tracing"}],"ARM Case Number":"TS013295927","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]
Was this topic helpful?
Document Information
Modified date:
08 August 2023
UID
ibm17003559