Load balancer: NGINX

Discovery of NGINX load balancers is performed by SSH.

NGINX is an open source web server with a load balancer. Discovery identifies the web server and information related to the load balancer.

Important: Discovery treats load balancers as network devices and attempts to discover them primarily using SNMP. If a load balancer in your system running on a Linux host has SNMP and SSH ports open, Discovery might classify it based on the SSH port, which has classification priority over SNMP. To ensure that Discovery properly classifies your load balancers, create a Discovery behavior for load balancers that includes SNMP but not SSH.

Consider the following requirements for discovering NGINIX servers:

  • Ensure that the NGINX software is installed and running on the server.
  • Grant the MID Server has access to the NGINX configuration file, which is /etc/nginx/nginx.conf by default.
  • Enable secure shell (SSH) commands.
  • The NGINX probes require credentials and execute privileges to run commands.
The Nginx Process Classifier detects a running process that matches the following criteria during the exploration of a UNIX server by matching the following criteria.
  • The name of the process starts with nginx.
  • The name of the process contains master.
If there is a match on one of these criteria:
  • A record is created in the Web Server [cmdb_ci_web_server] table.
  • A Runs on relationship is created in the CI Relationship [cmdb_rel_ci] table for the Linux Server [cmdb_ci_linux_server] table and the Web Server [cmdb_ci_web_server] table.
The following probes are triggered after classification:
Table 1. NGINX probes
Probe Description Commands
Nginx – Version This probe contains a Bourne shell script. It determines the version of NGINX and populates the Web Server [cmdb_ci_web_server] table. nginx
Nginx – Get Configuration This probe contains a Bourne shell script and an argument that determines the path of the NGINX configuration file. The probe identifies configuration parameters based on keywords within the configuration file and returns them as a single payload result. echo, sed, cut, grep, egrep (within the Borne shell script)

In addition to populating the data, the following relationships records are created in CI Relationships [cmdb_rel_ci] table:

  • The records in the cmdb_ci_web_server table run on the cmdb_ci_linux_server table records.
  • The records in the cmdb_ci_lb_service table use the cmdb_ci_lb_pool table records.
  • The records in the cmdb_ci_pool table are used by the cmdb_ci_service table records.
  • The records in the cmdb_ci_pool table are members of the cmdb_ci_pool_member table records.
  • The records in the cmdb_ci_pool_member table are members of the cmdb_ci_pool table records.