Does setting scratch config location, accomplish the same thing as setting a syslog.global.logdir?
If not - what are the differences? If one is set and the other not - is something lost?
I've just noticed, that the syslog.global.logdir location defaults to: [] /scratch/log
So if that's the case - if scratch is set to a datastore and folder (for example .locker/hostname), then the logs are set to that same datastore, in the /log folder, so: datastore/.locker/hostname/log would be where the logs are stored.
Does that seem correct?
AFAIK, setting syslog.global.logdir redirects the logs to the specified logdir location ( for the loggers who are registered with syslog service) . This is mainly used if you want to redirect the logs to a NFS or a remote location . Once this is set, the local logging continues along with the remote logging to the specified logdir.
scratch is for a different purpose and this partition contains vm-support and core file location in addition to logging partition
hmmm
so I'm asking relative to hosts that boot from SD cards, and needing to set a permanent location for logging info.
It sounds like you are saying that we should be setting both "scratch' AND logging to a datastore - if we have only logging set, then we are missing some potential trouble-shooting info, in case our host has an issue? I had sort of thought that "scratch" covered it all (that has been a practice that we've followed - setting scratch location to a datastore, but we've never thought it was necessary to also set syslog.global.logdir location also.
I've just noticed, that the syslog.global.logdir location defaults to: [] /scratch/log
So if that's the case - if scratch is set to a datastore and folder (for example .locker/hostname), then the logs are set to that same datastore, in the /log folder, so: datastore/.locker/hostname/log would be where the logs are stored.
Does that seem correct?
As I mentioned earlier, setting syslog.global.logdir to a new value allows logs to be redirected to a central logging server ( such as the vcenter syslog collector) . If this value is not set, whichever directory pointed by scratch will be identified as the log location. In some datacenters, the logs need to be redirected to a central logging server ( due to 3rd party log monitoring tools, compliance etc) , in such cases sylog.global.logdir value helps to set it.
The following 2 commands gives indication on current configuraiton and the various logging services which will be logged into syslog.global.logdir location
~ # esxcli system syslog config logger list
~ # esxcli system syslog config get