While it is possible to redirect vCloud Director cell logs by editing log4j.properties file to remote syslog server (see KB 2004564) there is an alternative agent based method utilizing vRealize Log Insight.
Log Insight agent is installed on each cell and then remotely managed from Log Insight server. Here are some advantages of this approach:
- no manual edits of log4j file which gets overwritten with each upgrade
- as we do not rely log4j logger we are able to collect also API request log files which are generated by Jetty
- agent uses reliable TCP communication as opposed to unreliable UDP
- we no longer rely on source IP to identify sender; cells can use source NAT (with single IP) to communicate with Log Insight server and we can still distinguish them
- we can remotely change which logs we want to monitor (info vs debug)
- and much more
Here is quick configuration how to:
- Download Log Insight Agent from Log Insight Server. It is already customized installation for your vRLI server. Administration > Agents > scroll down > Download Log Insight Agent Version 3.6.0 > pick rpm package
- Upload rpm file to each cell and install it with rpm -i VMware-Log-Insight-Agent-3.6.0-4148343.noarch_XXX.rpm
- Back in Agents configuration create active agent group from vCloud Director Cell Server template (copy template icon)
- Create hostname filter (use ? for any character substitution, you can add multiple entries in one line for ‘logical or’ or multiple lines for ‘logical and’
- Optionally edit agent configuration to include additional files or directories
