Step-by-step guide
MK_CONFDIR=/etc/check_mk /usr/lib/check_mk_agent/plugins/nginx_status <<<nginx_status>>> 127.0.0.1 8081 Active connections: 1 127.0.0.1 8081 server accepts handled requests 127.0.0.1 8081 380 380 380 127.0.0.1 8081 Reading: 0 Writing: 1 Waiting: 0
Debugging
Port Checking
root@klappanas:~# netstat -tulpen |grep 8081 tcp 0 0 0.0.0.0:8081 0.0.0.0:* LISTEN 0 43044 1353/nginx: master tcp6 0 0 :::8081 :::* LISTEN 0 43045 1353/nginx: master
Nginx Service
root@klappanas:~# systemctl status nginx
Stub status module
root@klappanas:~# nginx -V 2>&1 | grep -o with-http_stub_status_module with-http_stub_status_module
Checking the status page
root@klappanas:~# wget -qO - http://127.0.0.1:8081/nginx_status Active connections: 1 server accepts handled requests 398 398 398 Reading: 0 Writing: 1 Waiting: 0
Related articles