Probes 'NGINX – Version' and 'NGINX – Get Configuration' do not trigger


Description

Discovery to NGINX web server, Probes 'NGINX – Version' and 'NGINX – Get Configuration' do not trigger

Nginx - Version > /nav_to.do?uri=discovery_probes.do?sys_id=997b1168d7432100a866ee5b5e61031e
Nginx - Get Configuration > /nav_to.do?uri=discovery_probes.do?sys_id=7920e49ed7722100a866ee5b5e610399

Both probes related to
Process Classification: NGINX
/nav_to.do?uri=discovery_classy_proc.do?sys_id=1f0340dad7722100a866ee5b5e610357

Steps to Reproduce

Run discovery to NGINX web server where Nginx is installed through different configuration path other than the default path '/etc/nginx/nginx.conf'.


The ps -ef | grep nginx command on the server gives an output like this:

nginx: main process nginx -c /home/ubuntu/<file_name>.conf

Workaround

This problem has been fixed. If you are able to upgrade, review the Fixed In section to determine the latest version with a permanent fix your instance can be upgraded to.

The workaround is to modify the Process Classification "NGINX" /nav_to.do?uri=discovery_classy_proc.do?sys_id=1f0340dad7722100a866ee5b5e610357 by changing the line:
cmd = '';

to:
cmd = 'nginx';

The whole new code should look like the following:
// Command for nginx is the first parameter
var cmd = discoUtil.getParameterByIndex(0);
if (cmd.indexOf('-') == 0)
cmd = 'nginx';


Related Problem: PRB1383994