The configure-esxi script is included in the Log Insight virtual appliance.

The configure-esxi script configures all ESXi hosts of version 4.x and later that are connected to a vCenter Server to send their logs to Log Insight.

You can run the configure-esxi script by using the virtual appliance console in the vSphere Client, or though an SSH connection.

Note

User names and passwords in the scripts can be surrounded in single quotes.

If your user name or password contains one or more single quotes, you must escape them in the scripts. For example, if your password is ben's pa$$word, in the script you must type 'ben\'s pa$$word'.

You must adapt the script to your environment.

Verify that you know the credentials for the vCenter Server.

Verify that you know the host name or IP address of the vCenter Server.

Verify that you know the host name or IP address of the Log Insight virtual appliance.

Verify that the ports required for communication between the ESXi host and the Log Insight virtual appliance are open through the firewalls and switches on your network.

Verify that you have the root user credentials to log in to the Log Insight virtual appliance.

If you plan to connect to the Log Insight virtual appliance by using SSH, verify that TCP port 22 is open.

1

Establish an SSH connection to the Log Insight virtual appliance and log in as the root user.

2

To configure all ESXi 4.x and 5.x hosts nondestructively to send their logs to myloginsight.mydomain.com, run the following command.

configure-esxi -u 'my-vc-user' -s myvc.mydomain.com -t udp://loginsight.mydomain.com:port

Existing remote logging configurations are preserved, so logs are sent to multiple locations.

Note

With this example, ESXi 4.x hosts are configured only if they do not already have a remote syslog target.

3

To configure all ESXi 4.x and 5.x hosts to send their logs, run the following command.

configure-esxi -u 'my-vc-user' -s myvc.mydomain.com -t udp://loginsight.mydomain.com:port -f

Because ESXi 4.x does not support sending logs to multiple targets, this command overwrites any existing settings for 4.x servers.

4

To reload syslog on all ESXi hosts, run the following command.

configure-esxi -u 'my-vc-user' -s myvc.mydomain.com -r

If you are running certain versions of ESXi 5.x, you must reload syslog each time the destination syslog server restarts.

5

To query the current remote syslog configurations on all ESXi 4.x and 5.x hosts attached to a vCenter Server, run the following command.

configure-esxi -u 'my-vc-user' -s myvc.mydomain.com -q
6

(Optional) To remove a specific syslog target from the list of remote syslog targets, run the following command.

configure-esxi -u 'my-vc-user' -s myvc.mydomain.com -r udp://loginsight.mydomain.com:port

You can run this command to undo any previous settings that you applied, or remove existing targets that are no longer valid.

Note

The configurations that you apply by using the configure-esxi script might not be reflected in the Log Insight user interface.

For complete information about using the configure-esxi script, run configure-esxi --help.