• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

NGINX: Problems with netstat display

P_heck

Basic Pleskian
Hello,

OS Debian 7.8
Plesk version 12.0.18 Update #62

Changed from Apache to NGINX and everything works fine - only problem I have is with the monitoring with OMD/check_mk using the nginx_status plugin:

The plugin states a "netstat -tlnp" (line 35) and then looks for a process called "nginx" (definition in line 45).

After I have changed nginx related entries in the Plesk panel, nginx will be automatically restarted by Plesk and the output from netstat now shows:

"1511/nginx: worker"

So the plugin returns an empty value (as it expects nginx without the colon) causing a warning in the OMD console.

After restarting NGINX on the commandline (service nginx restart), the netstat output now reads:

"5368/nginx"

which is then ok for the monitoring!

Looks for me, that the restart initiated by the panel is causing this different behavior.

Anyone any idea how to avoid nginx starting with the ":_ worker" parameter?

Ciao Peter
 
Why you do not use Plesk watchdog instead of this nginx plugin?
And actually it is not Plesk related issue. Plesk calls reload only, but name of process sets nginx.
I'd suggest you modify plugin so it did readlink /proc/PID/exe and compares it with /usr/sbin/nginx:

[root@ppu12-0 ~]# netstat -tlnp | grep nginx
tcp 0 0 10.58.103.102:443 0.0.0.0:* LISTEN 3399/nginx
tcp 0 0 10.58.103.102:80 0.0.0.0:* LISTEN 3399/nginx

[root@ppu12-0 ~]# readlink /proc/3399/exe
/usr/sbin/nginx
 
Hello Igor,

thanks for the response! Will have a look at Plesk Watchdog.
Will see what I can do with NGINX support. Anyway, a bugfix of the script has already been propagated as a suggestion to GitHub following a bug report I issued there:

41 - pid, proc = parts[6].split('/')
41 + pid, proc = parts[6].lstrip(":").split('/')

Ciao Peter
 
Back
Top