Nginx Monitoring Integration
Sematext offers a simple, easy to install, Nginx monitoring agent with minimal CPU and memory overhead.
Install Nginx Monitoring Agent¶
Setting up the monitoring agent takes less than 5 minutes:
-
Activate the Nginx stub_status module in the server section of your Nginx config file. If you are using the default Nginx config file it will be in
/etc/nginx/sites-enabled/default
:location /nginx_status { stub_status on; access_log off; }
-
Create an Nginx App in the Integrations / Overview (or Sematext Cloud Europe). This will let you install the agent and control access to your monitoring and logs data.
- Name your Nginx monitoring App and, if you want to collect Nginx logs as well, create a Logs App along the way.
- Install the Sematext Agent according to the setup instructions displayed in the UI.
Nginx Metrics¶
Metric Name | Key | Agg | Type | Description |
---|---|---|---|---|
requests | nginx.request.count | Sum | Long | requests: Request count |
reading | nginx.requests.connections.reading | Avg | Double | reading: Nginx reads request header |
writing | nginx.requests.connections.writing | Avg | Double | writing: Nginx reads request body, processes request, or writes response to a client |
waiting | nginx.requests.connections.waiting | Avg | Double | waiting: keep-alive connections |
active | nginx.requests.connections.active | Avg | Double | active: number of all open connections |
PHP-FPM Monitoring¶
PHP-FPM monitoring can be enabled along with Nginx monitoring. See PHP-FPM for more details.
Troubleshooting¶
If you are having issues with Sematext Monitoring, i.e. not seeing Nginx metrics, see How do I create the diagnostics package.
For more troubleshooting information please look at Troubleshooting section.