<TIMESTAMP> vcenter.example.com vpxd[7165] Event [5680655] [1-1] [<TIMESTAMP>] [vim.event.VmReconfiguredEvent] [info] [VSPHERE.LOCAL\Administrator
] [<DATACENTER] [5680652] [Reconfigured <VM_NAME> on <ESX_SERVER> in <DATACENTER>.
<TIMESTAMP> vcenter.example.com
<TIMESTAMP> vcenter.example.com Modified:
<TIMESTAMP> vcenter.example.com
<TIMESTAMP> vcenter.example.com config.hardware.numCPU: 1 -> 2;
<TIMESTAMP> vcenter.example.com config.cpuAllocation.shares.shares: 1000 -> 2000;
<TIMESTAMP> vcenter.example.com Added:
<TIMESTAMP> vcenter.example.com
<TIMESTAMP> vcenter.example.com Deleted:
<TIMESTAMP> vcenter.example.com
<TIMESTAMP> vcenter.example.com ]
*.* @@<REMOTE_SYSLOG_SERVER>:514;RSYSLOG_SyslogProtocol23Format
*.* @@<REMOTE_SYSLOG_SERVER>:51484;RSYSLOG_SyslogProtocol23Format
#vpxd main log
input(type="imfile"
File="/var/log/vmware/vpxd/vpxd.log"
Tag="vpxd-main"
Severity="info"
startmsg.regex="^[[:digit:]]{4}-[[:digit:]]{1,2}-[[:digit:]]{1,2}T[[:digit:]]{1,2}:[[:digit:]]{1,2}:[[:digit:]]{1,2}"
Facility="local0"
deleteStateOnFileDelete="on"
reopenOnTruncate="on")
<TIMESTAMP> eth0 Out IP <VCENTER_SERVER>.33914 > <REMOTE_SYSLOG_SERVER>.syslog: SYSLOG local0.info, length: 810E..F..@.@..#...Q...=.z...2."<134>1 <TIMESTAMP> <VCENTER_SERVER> vpxd-main - - - <TIMESTAMP>info vpxd[08062] [Originator@6876 sub=VmProv opID=mrbhb6rg-273408-auto-5uyp-h5:70020561-e2-01] Applying ConfigSpec (vim.vm.ConfigSpec) {\n--> changeVersion = "<TIMESTAMP>", \n--> createDate = "<TIMESTAMP>", \n--> flags = (vim.vm.FlagInfo) {\n--> virtualMmuUsage = "automatic", \n--> virtualExecUsage = "hvAuto", \n--> }, \n--> numCPUs = 1, \n--> cpuAllocation = (vim.ResourceAllocationInfo) {\n--> shares = (vim.SharesInfo) {\n--> shares = 1000, \n--> level = "normal"\n--> }, \n--> }, \n--> virtualNuma = (vim.vm.VirtualNuma) {\n--> }, \n--> } to VM ds:///vmfs/volumes/0c16f0d1-efa53cef/test/vm_name.vmx on host <ESX_HOST>NOTE: <134>1 in the packet capture above means that the syslog client is sending the message in the RFC 5424 format.
vCenter Server 8 and 9
Since vCenter's syslog is configured to send messages grouped by timestamp and doesn't split the messages into multiple lines, something along the network path to the syslog server or the syslog server itself is splitting the messages into multiple lines. Often times vCenter will be configured to send its logs to a log forwarder that will relay the logs to the destination syslog server.
If either a log forwarder or syslog server is configured to use RFC 3164 or is using RFC 5424 with octet-counted framing disabled, you will see the original message sent by vCenter split into multiple lines on the syslog server.
By default, legacy TCP receivers using RFC 3164 look for a literal newline character (\n) to mark the end of a message. If vCenter sends a log containing internal \n characters (as shown in packet capture in the Issue/Description above) over a standard TCP stream, a legacy receiver will split the stream on the new \n characters resulting in the multi-line log messages.
Configure either the log forwarder or syslog srever to use RFC 5424 or Octet-Counted Framing. Before sending the message, vCenter calculates the exact length of the multi-line block and prepends it to the stream (e.g., 452 <syslog message...>). A log forwarder or syslog server using Octet-Counted Framing will know to read exactly 452 characters, ignores the internal newlines, and keeps the log whole.