Skip to main content

Configure the vSphere LAM

VMware vSphere is VMware's cloud computing virtualization platform. It is a package containing many components. The two main components are:

  • VMware vCenter Server: The central control point for data center services, such as access control, performance monitoring and alarm management

  • VMware vSphere Client: Allows users to remotely connect to ESXi or vCenter Server

The LAM connects with the vCenter server and fetches events from it. The events generated in it are the actions performed on virtual machines present in it, or their status updates. The LAM after fetching the events, forwards them to Moogsoft Enterprise.

You can install a basic vSphere integration in the UI. See VMware vSphere for integration steps.

Before You Begin

Before you set up the LAM, ensure you have met the following requirements for each vSphere system:

  • You have the hostname or the IP address of the VMware vSphere instance.

  • You have credentials to connect to the VMware vSphere account.

  • The port for your VMware vSphere server is open and accessible from Moogsoft Enterprise.

Configure the LAM

Edit the configuration file to control the behavior of the vSphere LAM. You can find the file at $MOOGSOFT_HOME/config/vsphere_lam.conf.

See the LAM and Integration Reference for a full description of all properties. Some properties in the file are commented out by default. Uncomment properties to enable them.

  1. Configure the connection properties for each target source:

    • url: Host name or IP address of the vSphere server.

    • username: vSphere console account username of the account.

    • password or encrypted_password: vSphere console account password or encrypted password.

    • vm_names: Name(s) of the virtual machine(s) to fetch events from.

  2. If you want to connect through a proxy server, configure the host, port, user, and password or encrypted password properties in the proxy section for the target.

  3. Configure the SSL properties if you want to encrypt communications between the LAM and the REST connection:

    • disable_certificate_validation: Whether to disable SSL certificate validation.

    • path_to_ssl_files: Path to the directory that contains the SSL certificates.

    • server_cert_filename: SSL root CA file.

    • client_key_filename: Client SSL key.

    • client_cert_filename: Client SSL certificate.

  4. Configure the LAM behavior for each target:

    • request_interval: Length of time to wait between requests, in seconds.

    • max_retries: Number of times the LAM attempts to reconnect after connection failure.

    • retry_interval: Length of time to wait between reconnection attempts, in seconds.

    • retry_recovery: Length of time between recovery requests, in seconds.

  5. Optionally configure the LAM identification and capture logging details:

    • name: Maps to $Laminstancename, so that the agent field indicates events Moogsoft Enterprise ingests from this LAM.

    • capture_log: Name and location of the LAM's capture log file, which it writes to for debugging purposes.

  6. Optionally configure severity conversions. See Severity Reference for further information and "Conversion Rules" in Tokenize Source Event Data for details on conversions in general.

  7. Optionally configure the process logging details:

    • configuration_file: Name and location of the LAM's process log configuration file. See Configure Logging for more information.Configure Logging

Example

An example vSphere LAM configuration is as follows:

monitor:
{
    name: "vSphere Lam Monitor",
    class: "CvSphereMonitor",
    request_interval: 60,
    max_retries: -1,
    retry_interval: 60,
    targets:
    {
        target1:
        {
            host_name: "http://examplevsphere1",
            user_name: "vsphere_user1",
            #password: "password",
            encrypted_password: "qJAFVXpNDTk6ANq65pEfVGNCu2vFdcoj70AF5BIebEc=",
            disable_certificate_validation: false,
            path_to_ssl_files: "config",
            server_cert_filename: "server1.crt",
            client_key_filename: "client1.key",
            client_cert_filename: "client1.crt",
            request_interval: 60,
            max_retries: -1,
            retry_interval: 60,
        }
        target2:
        {
            host_name: "http://examplevsphere2",
            user_name: "vsphere_user2",
            #password: "password",
            encrypted_password: "bDGFSClSHBn8DSw43nGwSPLSv2dGwdsj50WD4BHdfVa&",
            disable_certificate_validation: false,
            path_to_ssl_files: "config",
            server_cert_filename: "server2.crt",
            client_key_filename: "client2.key",
            client_cert_filename: "client2.crt",
            request_interval: 60,
            max_retries: -1,
            retry_interval: 60,
        }
}

Configure for High Availability

Configure the vSphere LAM for high availability if required. See High Availability Overview for details.

Configure LAMbot processing

The vSphere LAMbot processes and filters events before sending them to the Message Bus. You can customize or bypass this processing if required. You can also load JavaScript files into the LAMbot and execute them.

See LAMbot Configuration for more information. An example vSphere LAM filter configuration is shown below.

filter:
{
    presend: "VSphereLam.js",
    modules: [ "CommonUtils.js" ]
}

Start and Stop the LAM

Restart the vSphere LAM to activate any changes you make to the configuration file or LAMbot.

The LAM service name is vspherelamd.

See Control Moogsoft Enterprise Processes for the commands to start, stop and restart the LAM.

You can use a GET request to check the status of the vSphere LAM. See "Check the LAM Status" in Configure the REST LAM for further information and examples.

Configure vSphere

After you have the vSphere LAM running and listening for incoming requests, you can configure vSphere. See "Configure vSphere" in VMware vSphere.