-1

ESXI: 70u2

Hi,

I can't found "/etc/logrotate.conf", I understand he don't exist in this version.

In the file "/etc/vmsyslog.conf" I can specify some options, the split by size has been for max but not for minimum. If the file don't grow to specific size, he isn't splitted.

How split logfiles by hours in my ESXi? How list all options I can write in "/etc/vmsyslog.conf"?

Cordially

CH06
  • 13
  • 1
  • 5

2 Answers2

0

ESXi only allows the log to be rotated by size. From the documentation:

  • Syslog.global.defaultRotate - The maximum number of log files to keep locally on the ESXi host in the configured logDir. Does not affect remote syslog server retention. Defaults to 8.
  • Syslog.global.defaultSize - The maximum size, in kilobytes, of each local log file before it is rotated. Does not affect remote syslog server retention. Defaults to 1024 KB. For more information on sizing, see Providing Sufficient Space for System Logging.

If that is not enough for you you can configure ESXi to send the logs to a syslog server:

  • Syslog.global.logHost - Comma-delimited list of remote servers where logs are sent using the syslog protocol. If the logHost field is blank, no logs are forwarded. Include the protocol and port, similar to tcp://hostname:514 or udp://hostname:514 or ssl://hostname:1514.

You can then configure your syslog server any way you want.

Don't edit configuration files on the ESXi server. Use the advanced configuration options.

Gerald Schneider
  • 23,274
  • 8
  • 57
  • 89
0

I found from VMware page Controlling the size and number of vmkernel logs in ESX hosts (1037645).

The conf logrotate in ESX (not ESXi) is avalaible in next related versions:

  • VMware ESX Server 3.5.x
  • VMware ESX 4.1.x
  • VMware ESX 4.0.x

With this code in the file "/etc/logrotate.d/vmkernel":

/var/log/vmkernel{
create 0600 root root
missingok
nocompress
# keep a history over 3 years.
monthly
rotate 36
# max log size of 200k (thus limiting total disk usage to under 8megs)
size 200k
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
endscript
}

For ESXi (not ESX) 7.0, I found doc contains in the page 213 the chapter: "Configuring System Logging" in the pdf: VMware ESXi Installation and Setup.

He contains a explained text of @Gerald Schneider answer.

Thank's Again

NOTE: After comment @Gerald Schneider, ESX is not ESXi, read differences in this link: ESX vs. ESXi

CH06
  • 13
  • 1
  • 5