HAProxy load balancer discovery with patterns

  • Release version: Xanadu
  • Updated September 12, 2024
  • 3 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 with patterns

    The HAProxy load balancer discovery with patterns enables ServiceNow customers to discover HAProxy Community edition load balancers running on Linux servers using pattern-based discovery. This method is the default starting with the Discovery and Service Mapping Patterns 1.15.0 version and supports HTTP mode load balancing. TCP mode load balancing is not supported. The discovery process maps one-to-one relationships between front-end and back-end ports, focusing on the lowest front-end port when multiple front-ends connect to a single back-end.

    Show full answer Show less

    Prerequisites

    • Ensure Discovery and Service Mapping Patterns and Visibility Content applications are up to date.
    • Verify HAProxy is installed and running on the Linux server.
    • Confirm permission to run the HAProxy version command (haproxy -v).
    • Ensure read access to the HAProxy configuration file (haproxy.cfg).
    • Create SSH credentials for secure access during discovery.
    • Schedule a horizontal discovery to initiate the process.

    Data Collected by Discovery

    When running the HAProxy pattern, Discovery populates the CMDB with these key configuration items (CIs):

    • HAProxy Load Balancer [cmdbcilbhaproxy]: Captures name, version, and description of the HAProxy instance.
    • Load Balancer Service [cmdbcilbservice]: Records service name (format: <LB name>:<LB port>), listening port, IP address, and highest port used.
    • Load Balancer Pool [cmdbcilbpool]: Contains pool name, associated HAProxy load balancer, load balancing method (e.g., Round Robin), discovery timestamp, and install status.
    • Load Balancer Pool Member [cmdbcilbpoolmember]: Lists pool member name, service port, IP address, and associated pool.

    Configuration Item Relationships

    Discovery establishes relationships among the load balancer components to represent their structure accurately:

    • Load Balancer Pool references HAProxy Load Balancer.
    • Load Balancer Pool Member references HAProxy Load Balancer.
    • Load Balancer Service references HAProxy Load Balancer and Load Balancer Pool.
    • Load Balancer Pool owns Load Balancer Pool Members.
    • Load Balancer Service runs on Hardware.

    Why This Matters

    This pattern-based discovery allows ServiceNow customers to automatically and accurately discover HAProxy load balancers and their detailed configurations within their IT environment, ensuring up-to-date visibility and relationships in the CMDB. This supports better infrastructure management, troubleshooting, and service mapping capabilities related to HAProxy load balancers.

    The Discovery and Service Mapping Patterns application uses the HA Proxy pattern to find HAProxy Community load balancers running on a Linux server. Discovering some of these resources may require updating to the latest version of the Discovery and Service Mapping Patterns application from the ServiceNow Store.

    HAProxy Community edition is an open-source load balancer that can run in either TCP or HTTP mode. Note that although Discovery supports HAProxy for HTTP load balancing, TCP load balancing isn’t supported.

    Starting with Discovery and Service Mapping Patterns 1.15.0 version, pattern-based discovery is the default method for discovering HAProxy load balancers. For information on probe-based HAProxy discovery, see HAProxy load balancer discovery using probes.

    Note:
    HAProxy discovery supports one-to-one relationship mapping between a front-end port and a back-end port. If multiple front-ends are connected to the same back-end, the discovery process will only map the relationship from the lowest front-end port number in a defined range to the back-end port.

    Request apps on the Store

    Visit the ServiceNow Store website to view all the available apps and for information about submitting requests to the store. For cumulative release notes information for all released apps, see the ServiceNow Store version history release notes.

    To learn about HAProxy load balancers and their versions that you can discover, refer to Detailed information on products discovered by ITOM Visibility.

    Prerequisites

    Verify that the applications are up to date
    • Discovery and Service Mapping Patterns
    • Visibility Content
    Verify HAProxy is installed on the Linux server
    Verify the HAProxy software is installed and running on a Linux server.
    Verify permission to run HAProxy command
    Verify you have permission to run the following command: <HAproxy Installation Path>/haproxy -v.
    Verify read access to HAProxy configuration file
    Verify you have read access to the haproxy.cfg file.
    Create SSH credentials
    For more information, see SSH credentials.
    Schedule a horizontal discovery
    For more information, see Schedule a horizontal discovery.

    Data collected by Discovery during horizontal discovery

    Discovery populates the data in the CMDB when running the HA Proxy Pattern.

    Table 1. HAProxy Load Balancer [cmdb_ci_lb_haproxy]
    Field Description
    Name [name] Name of the HAProxy load balancer.
    Version [version] Version of the HAProxy load balancer.
    Description [short_description] Description of the HAProxy process, which is obtained by running the command: haproxy -version.
    Table 2. Load Balancer Service [cmdb_ci_lb_service]
    Field Description
    Name [name] Name of the load balancer in the following format: <LB name>:<LB port>.
    Port [port] Port on which the load balancer is listening.
    IP Address [ip_address] IP address of the load balancer service.
    Last port [last_port] Highest port number used by the load balancer service.
    Table 3. Load Balancer Pool [cmdb_ci_lb_pool]
    Field Description
    Name [name] Name of the load balancer pool.
    Load balancer [load_balancer] HAProxy containing the load balancer pool.
    Load balancing method [load_balancing_method] Method used to load balance the pool, for example: Round Robin.
    Most recent discovery [last_discovered] Timestamp of the most recent discovery.
    Install Status [install_status] Install status of the load balancer pool, for example: Installed.
    Table 4. Load Balancer Pool Member [cmdb_ci_lb_pool_member]
    Field Description
    Name [name] Name of the load balancer pool member.
    Service port [service_port] Port used by the pool member.
    IP Address [ip_address] IP address of the pool member host.
    Pool [pool] Load balancer pool containing the pool member.

    CI relationships

    Discovery creates these relationships to support the HAProxy load balancer discovery.

    CI Relationship CI
    Load Balancer Pool [cmdb_ci_lb_pool] References HAProxy Load Balancer [cmdb_ci_lb_haproxy]
    Load Balancer Pool Member [cmdb_ci_lb_pool_member] References HAProxy Load Balancer [cmdb_ci_lb_haproxy]
    Load Balancer Service [cmdb_ci_lb_service] References HAProxy Load Balancer [cmdb_ci_lb_haproxy]
    Load Balancer Pool [cmdb_ci_lb_pool] Allocated to::Allocated from Load Balancer Service [cmdb_ci_lb_service]
    Load Balancer Pool [cmdb_ci_lb_pool] Owns::Owned by Load Balancer Pool Member [cmdb_ci_lb_pool_member]
    Load Balancer Pool [cmdb_ci_lb_pool] References Load Balancer Pool Member [cmdb_ci_lb_pool_member]
    Load Balancer Service [cmdb_ci_lb_service] Runs on::Runs Hardware [cmdb_ci_hardware]