Introduction
Munin uses the nginx_status page to process Nginx data
Procedure
Confirm that the staus page does not work with the following command:
curl -I http://127.0.0.1/nginx_status
HTTP/1.1 404 Not Found
Server: nginx/1.21.1
In order to enable the nginx_status page, you need to create a new config file:
vi /etc/nginx/conf.d/status.conf
And add the following lines:
server {
listen 127.0.0.1;
server_name localhost;
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}
}
Then restart the Nginx service with the following script:
/scripts/restartsrv_nginx
The check again status page
curl -I http://127.0.0.1/nginx_status
HTTP/1.1 200 OK
Server: nginx/1.21.1
Now Munin should start to show data for Nginx status and requests, please wait few minutes to allow data to accumulate.