Loading

×Sorry to interrupt
CSS Error

Refresh

Cookie Preference Center

General Information on cookies

When you visit our website, we use cookies to ensure that we give you the best experience. This information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience on the site and the services we are able to offer. Further information can be found in our

Cookie Policy.

Strictly Necessary

Strictly Necessary

Always Active

Strictly Necessary

Strictly necessary cookies are always enabled since they are essential for our website to function. They enable core functionality such as security, network management, and website accessibility. You can set your browser to block or alert you about these cookies, but this may affect how the website functions. For more information please visit www.aboutcookies.org or www.allaboutcookies.org.

Cookie Details‎

Performance

Performance

Performance

Performance cookies are used to analyze the user experience to improve our website by collecting and reporting information on how you use it. They allow us to know which pages are the most and least popular, see how visitors move around the site, optimize our website and make it easier to navigate.

Cookie Details‎

Please confirm your settings by refreshing the page.

Functional

Functional

Functional

Functional cookies help us keep track of your past browsing choices so we can improve usability and customize your experience. These cookies enable the website to remember your preferred settings, language preferences, location and other customizable elements such as font or text size. If you do not allow these cookies, then some or all of these services may not function properly.

Cookie Details‎

Advertising

Advertising

Advertising

Advertising cookies are used to send you relevant advertising and promotional information. They may be set through our site by third parties to build a profile of your interests and show you relevant advertisements on other sites. These cookies do not directly store personal information, but their function is based on uniquely identifying your browser and internet device.

Cookie Details‎

Advertising Cookies

Consent Leg.Interest

Select All Vendors

Select All Vendors

Select All Hosts

Select All

Clear Filters

Information storage and access

Apply

Confirm My Choices Reject All Allow All

My Subscriptions

Loading

Knowledge Base

Enabling syslog on ESXi 3.5 and 4.x (1016621)

Last Updated: 3/20/2024Categories: How toTotal Views: 101875Language:
Chinese (Simplified)JapaneseSpanishEnglish

Subscribe to get an email
newsletter with new updates

Please provide article feedback:

Purpose

VMware vSphere ESXi 3.5 and 4.x hosts run a syslog service (syslogd) which provides a standard mechanism for logging messages from the VMkernel and other system components. By default in ESXi, these logs are placed on a local scratch volume or a ramdisk. To preserve the logs further, ESXi can be configured to clone these logs to an alternate storage location on disk, and to send the logs across the network to a third-party syslog server.

Retention, rotation and splitting of logs received and managed by a third-party syslog server are fully controlled by that syslog server. ESXi cannot configure or control third-party log management. For more information, see the documentation for your third-party syslog server.

Regardless of the additional syslog configuration specified using these options, logs continue to be placed on the default locations on the ESXi host. For more information, see Location of ESXi log files (1021801).

Note: This article only pertains to ESXi 3.5 and 4.x. For information on configuring syslog for ESX, see Enabling syslog on ESX (1005030). For more information on configuring syslog on ESXi 5.1, see Configuring syslog on ESXi 5.x (2003322).

Resolution

Configuration of the syslog service on ESXi can be performed from the vSphere Client, PowerCLI, or vCLI. Select the method appropriate for your environment.

Configuring Local and Remote logging using Advanced Configuration Options

The Local and Remote syslog functionality can be configured for a host using advanced configuration options, which can be set using the vSphere Client, PowerCLI, or vCLI. This configuration cannot be performed using the local console's esxcfg-advcfg command.

Syslog.Local.DatastorePath - a location on a local or remote datastore and path where logs are saved to. Has the format [datastorename] directory/filename, which maps to /vmfs/volumes/datastorename/directory/filename. If the datastore path field is blank, the logs are only placed in their default location. For ESXi 4.1, the default is []/scratch/log/messages if scratch is defined. For more information on scratch, see Creating a persistent scratch location for ESXi 4.x and 5.x (1033696). For all other cases, the default is blank.

Syslog.Remote.Hostname - a remote server's DNS name or IP address where logs are sent using the syslog protocol. If the hostname field is blank, no logs are forwarded.

Syslog.Remote.Port - a remote server's UDP port where logs are sent using the syslog protocol. Default is port 514.

For more information on setting advanced configuration options using each method, see Configuring advanced options for ESX/ESXi (1038578).

Configuring Remote logging using the vSphere Command Line Interface

The Remote syslog functionality can be configured from the vCLI using the vicfg-syslog command, which is installed with the vSphere Management Assistant appliance. For more information, see the Syslog Service Specification with vicfg-syslog section of the vSphere Command-Line Interface Installation and Reference Guide or the vSphere Management Assistant Documentation.

Open a console at the location the vCLI is installed, or login to the vMA.

Determine the current configuration using the command:

vicfg-syslog --server ESXiHostnameOrIP --username MyUsername --password MyPassword --show

For example:

vicfg-syslog --server esxhost1 --username root --password MyPassword --show

Set the hostname or IP address and port of the remote syslog server using the command:

vicfg-syslog --server ESXiHostnameOrIP --username MyUsername --password MyPassword --setserver SyslogHostnameOrIP --setport PortNumber

For example:

vicfg-syslog --server esxhost1 --username root --password MyPassword --setserver 10.5.0.200 --setport 514

Note: To remove the remote syslog configuration, set the remote syslog server name to a blank string "".

Validate the configuration change by repeating step 2.

Configuring Remote logging using PowerCLI

The Remote syslog functionality can be configured using PowerCLI using the Set-VMHostSysLogServer command. For more information, see the vSphere PowerCLI documentation.

Connect to the vCenter Server or ESXi host using the command:

Connect-VIServer HostnameOrIP

Determine the current configuration using the command:

Get-VMHost ESXHostnameOrIP | Get-VMHostSysLogServer

Note: A blank result indicates that the syslog server is not configured for the specified host.

Set the hostname or IP address and port of the remote syslog server using the command:

Get-VMHost ESXHostnameOrIP | Set-VMHostSysLogServer -SysLogServer SyslogHostnameOrIP -SysLogServerPort PortNumber

For example:

Get-VMHost esxhost1 | Set-VMHostSysLogServer -SysLogServer 10.5.0.200 -SysLogServerPort 514

Note: To remove the remote syslog configuration, set the remote syslog server name to $null.

Validate the configuration change by repeating step 2.

Notes:

To reload changes to the syslog configuration file, use the command: kill -HUP $(cat /var/run/syslogd.pid)from an ESXi host command prompt.

If no process is found from the above command, start the syslog service using the command syslogd .

To retrieve or set the syslog configuration for multiple ESXi hosts at the same time, use Get-VMHost to query for multiple hosts within a data center or cluster. For more information, see the Get-VMHost section of the PowerCLI commandlet reference.

Related Information

The syslog configuration is stored in the file /etc/syslog.conf, in the format:

logfile=/vmfs/volumes/datstoreuuid/directory/filename
loghost=SyslogHostnameOrIP:PortNumber
Enabling syslog on ESX
Location of ESXi 3.5-4.1 log files
Creating a persistent scratch location for ESXi 4.x/5.x/6.x
Habilitando el syslog en ESXi
Configuring advanced options for ESXi/ESX
Configuring syslog on ESXi
ESXi 3.5 および 4.x での syslog の有効化
在 ESXi 3.5 和 4.x 中启用 syslog

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
Chinese (Simplified)JapaneseSpanishEnglish

Attachments

Additional Resources

KB
•
End Of General Availability of the Free vSphere Hypervisor (ESXi 7.x and 8.x) (2107518)

KB
•
デフォルトの SSL 証明書を使用するときに、[vCenter サービス ステータス] の表示で健全性サービスにアクセスできない (2031299)

KB
•
在 vSphere Client 中手动为 ESXi 设置暂存位置，显示已成功，但实际未成功 (2003678)

KB
•
vSphere Client で、ESXi のスクラッチの場所を手動で設定すると、成功したように見えるが、設定は反映されない (2003678)

Results 1-4 of 4

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

VMware vSphere ESXi

Related Versions:

VMware ESXi 4.1.x Installable

VMware ESXi 4.1.x Embedded

VMware ESXi 4.0.x Installable

VMware ESXi 4.0.x Embedded

VMware ESXi 3.5.x Installable

VMware ESXi 3.5.x Embedded

Take Our Survey

Support Assistant