Redirect selected log files to another machine or a Syslog Server
search cancel

Redirect selected log files to another machine or a Syslog Server

book

Article ID: 345261

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:
With the default settings, we are getting far more messages than we want, and we would only really like VCSA to send Syslog messages at level "error" and above.

Environment

VMware vCenter Server Appliance 6.5.x
VMware vCenter Server Appliance 6.7.x
VMware vCenter Server Appliance 6.0.x

Resolution

Back up the syslog.conf file located at /etc/vmware-syslog
Edit the syslog.conf and replace *.* with the type of messages you want to forward
eg: *.warn;*.error;*.crit;*.alert;*.emerg @192.168.0.89:514;RSYSLOG_SyslogProtocol23Format

Log files to redirect
OptionDescription
*All log files are redirected to the remote machine.
infoOnly informational log files are redirected to the remote machine.
noticeOnly notices are redirected to the remote machine.Notice indicates normal but significant condition.
warnOnly warnings are redirected to the remote machine.
errorOnly error messages are redirected to the remote machine.
critOnly critical log files are redirected to the remote machine.
alertOnly alerts are redirected to the remote machine. Alert indicates that action must be taken immediately.
emergOnly emergency log files are redirected to the remote machine. Emergency indicates that the system stopped responding and cannot be used.
 

Run the command systemctl restart rsyslog to restart the rsyslog service 

Run  the following commands to test

logger -p syslog.info "Info test - this won't appear at syslog server"

logger -p syslog.warn "Warn test - this won't appear at syslog server"

logger -p syslog.error "Error test - this will appear at syslog server"

logger -p syslog.crit "Crit test - this will appear at syslog server"


Additional Information

https://communities.vmware.com/thread/588518
https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.vsphere.monitoring.doc/GUID-9633A961-A5C3-4658-B099-B81E0512DC21.html