HAProxy load balancer discovery using probes

  • Release version: Xanadu
  • Updated August 1, 2024
  • 2 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of HAProxy Load Balancer Discovery Using Probes

    Discovery of HAProxy Community edition load balancers is performed via SSH, with pattern-based discovery being the default method since version 1.15.0. Customers can enable probe-based discovery by following specific guidelines. This method is essential for accurately discovering and managing HAProxy load balancers within the ServiceNow environment.

    Show full answer Show less

    Key Features

    • HAProxy Compatibility: Designed for HTTP load balancing, it supports session persistence and Layer 7 processing. TCP load balancing is not supported.
    • Discovery Requirements: HAProxy must be installed on a Linux server with the MID Server deployed and configured to access the HAProxy configuration file.
    • Probes Utilized: The discovery process employs various probes to gather critical information, including:
      • HAProxy – Version: Captures the HAProxy version.
      • HAProxy – Get Configuration: Gathers additional configuration details, populating multiple related tables.
    • Process Identification: The Unix - Active Processes probe is used to identify the HAProxy process, creating a record if one does not already exist.

    Key Outcomes

    Upon successful discovery, the following happens:

    • Records are created in the HAProxy Load Balancers table and related tables, including Load Balancer Service, Pool, Pool Member, Interface, and Application.
    • Establishes relationships between various configuration items, aiding in comprehensive management and oversight of the HAProxy environment.

    Discovery of HAProxy Community edition load balancers is performed by SSH.

    Note:
    Starting with Discovery and Service Mapping Patterns 1.15.0 version, pattern-based discovery is the default method for discovering HAProxy load balancers.

    HAProxy is an open-source load balancer that can manage any TCP service. It is particularly suited for HTTP load balancing because it supports session persistence and Layer 7 processing. Discovery supports HAProxy for HTTP load balancing. TCP load-balancing is not supported.

    Consider the following requirements for discovering the HAProxy:
    • The HAProxy software is installed and running on a Linux server.
    • The MID Server is deployed to explore the server and the MID Server has access to the server HAProxy configuration file.
    • The configuration probe checks for the haproxy.cfg file using one of the following methods:
      • Using the f parameter for the HAProxy process output.
      • Using the default /etc/haproxy/haproxy.cfg path.
    • The HAProxy probes require credentials and execute privileges to run commands.

    Discovery uses the Unix - Active Processes probe to identify an HAProxy load balancer when the name of the process is haproxy. If this criterion matches, a record is created in the HAProxy Load Balancers [cmdb_ci_lb_haproxy] table if one does not already exist for that running process.

    The following probes are triggered after classification:
    Table 1. HAProxy probes
    Probe Description Commands
    HAProxy – Version The sensor of this probe populates the HAProxy version in the HAProxy Load Balancers [cmdb_ci_lb_haproxy] table. haproxy
    HAProxy – Get Configuration The sensor of this probe populates additional information in the HAProxy Load Balancers [cmdb_ci_lb_haproxy] table. The probe also populates information in the Load Balancer Service [cmdb_ci_lb_service], Load Balancer Pool [cmdb_ci_lb_pool], Load Balancer Pool Member [cmdb_ci_lb_pool_member], Load Balancer Interface [cmdb_ci_lb_interface], and Load Balancer Application [cmdb_ci_lb_appl] tables. 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_lb_appl table run on the cmdb_ci_web_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.