Syslogs, we all use them in some form or another, and most places have their syslogs going to a collection server like Splunk or VMware’s own vRealize Log insight. In the event you have an alert configured that notifies you when an ESXi host has stopped sending syslogs to the logging server, or you get a “General System Error” when attempting to change the syslog.global.logdir configuration option on the ESXi host itself, you should open a secure shell to the ESXi server and investigate further.
1. Once a secure shell has been established with the ESXi host, check the config of the vmsyslogd service, and that the process is running by using the following command:
# esxcli system syslog config get
- If the process is running and configured, output received would be something similar to:
Default Network Retry Timeout: 180Local Log Output:
/vmfs/volumes/559dae9e-675318ea-b724-901b0e223e18/logs
Local Log Output Is Configured:
true
Local Log Output Is Persistent:
true
Local Logging Default Rotation Size: 1024 Local Logging Default Rotations: 8Log To Unique Subdirectory:
true
Remote Host: udp:
//logging-server
.mydomain-int.net:514
2. If the process is up, look for the current syslog process with the following command:
# ps -Cc | grep vmsyslogd
3. If the service is running, the output received would be similar to the example below. If there is no output, then the vmsyslogd service is dead and needs to be started. Skip ahead to step 5 if this is the case.
132798531 132798531 vmsyslogd
/bin/python
-OO
/usr/lib/vmware/vmsyslog/bin/vmsyslogd
.pyo
132798530 132798530 wdog-132798531
/bin/python
-OO
/usr/lib/vmware/vmsyslog/bin/vmsyslogd
.pyo
4. In this example, we would need to kill the vmsyslogd and wdog processes before we can restart the syslog daemon on the host.
# kill -9 132798530 # kill -9 132798531
5. To start the process issue the following command:
# /usr/lib/vmware/vmsyslog/bin/vmsyslogd
6. Verify that the process is correctly configured and running again.
# esxcli system syslog config get Default Network Retry Timeout: 180Local Log Output:
/vmfs/volumes/559dae9e-675318ea-b724-901b0e223e18/logs
Local Log Output Is Configured:
true
Local Log Output Is Persistent:
true
Local Logging Default Rotation Size: 1024 Local Logging Default Rotations: 8Log To Unique Subdirectory:
true
Remote Host: udp:
//logging-server
.mydomain-int.net:514
7. Log into the syslog collection server and verify the ESXi host is now properly sending logs.