Pre-requisites for Monitoring a VMware vSphere/ESX Server by Connecting to VMware vCenter

  • Ensure that the remote agent has IP connectivity to the vCenter server.
  • Ensure that the remote agent has web access to the webport (port 80/443) configured for the vCenter server. 
  • To measure the health of a vSphere host that is managed by vCenter, and to obtain the 'outside view' of VMs running on that host via vCenter, all the tests that the remote agent executes should be configured with the following:

    • The IP address of vCenter;

    • The name and password of a user with Administrator or Virtual Machine Administrator privileges to vCenter.

    However, if owing to security constraints, you cannot expose the credentials of the administrator, then, you can configure the tests with the credentials of a vCenter user with the following permissions:

    Permission

    Purpose

    Diagnostics

    This permission is required for log monitoring. The eG agent needs this permission to run the VmHostd Log Monitor test, the VMKWarning Log Monitor test, and the VmMessages Log Monitor test.

    Change settings

    This permission is required for collecting metrics on hardware status and performance.

    Sometimes, the VMware VI SDK may cache the hardware status metrics it collects and provide the test with the cached results. This may cause the eG agent to receive obsolete hardware status information from the SDK. This is also the reason why, you may at times notice a mismatch between the hardware status reported by the eG agent and by the vSphere client. To ensure that the eG agent always reports the current hardware status, you should configure the eG agent to obtain the hardware metrics from the VMware VI SDK only after the SDK resets the cache to clear its contents, and then refreshes the cache so that the latest hardware status information is fetched into it. To enable the eG agent to make the reset and refresh SDK calls, the esx user and esx password parameters of all eG tests must be configured with the credentials of a user on the vCenter server with the Change settings privilege.

    View and Stop Sessions

    vCenter servers terminate user sessions based on timeout periods. The default timeout period is 30 mins. When you stop an agent, sessions currently in use by the agent will remain open for this timeout period until vCenter times out the session. If the agent is restarted within the timeout period, it will open a new set of sessions. To enable the eG agent to close already existing sessions before it opens new sessions, you have to configure all the tests with the credentials of a vCenter user with permissions to View and stop sessions (prior to vCenter 4.1, this was called the View and Terminate Sessions permission).

    To know how to grant the above-mentioned permissions to a vCenter user, refer to Creating a Special Role on vCenter and Assigning the Role to a New User .

    Note

    When the remote agent is started/restarted, it first attempts to connect to the vCenter server and terminate all existing sessions for the user whose credentials have been provided for the tests. This is done to ensure that unnecessary sessions do not remain established in the vCenter server for the session timeout period.  Ideally, you should create a separate user account with the required credentials and use this for the test configurations. If you provide the credentials for an existing user for the test configuration, when the remote agent starts/restarts, it will close all existing sessions for this user (including sessions you may have opened using the Virtual Infrastructure client). Hence, in this case, you may notice that your VI client sessions are terminated when the remote agent starts/restarts.

  • VI APIs are memory-intensive, and therefore, while monitoring ESX servers using vCenter, the default memory setting of 128 MB will not be sufficient for the eG agent to pull out the required metrics. The maximum memory setting of the eG agent should hence be increased to any value between 256 MB and 1024 MB, but the exact value will depend upon the number of ESX servers being managed by the vCenter in your environment. Refer to Increasing the Memory Settings of the eG Agent that Monitors ESX Servers to know how to alter the memory settings of the eG agent.