Length: 382 words | Estimated Reading Time: 2 minutes

By default, in vCloud Availability 3.X there is no mechanism via the API/GUI to configure a remote syslog for forwarding the application logs which could be an issue if you require this for compliance reasons or to simplify troubleshooting. With some guidance from the VMWare Project Presto team I was able to successfully get the H4 service logs forwarded with relative ease using the following.

vCloud Availability uses Logback for service logging and the the logback.xml configuration file needs to be changed for each of the services for full service coverage. The logs can still be written to the local logging files however you can send copies to a remote syslog server for data warehousing.

Appliance Service Configuration Path Recommended Suffix Pattern
vCAV Manager cloud.service /opt/vmware/h4/cloud/config/logback.xml [C4] [%X{operationID}] [%thread] %-40.40logger{39} : %msg
vCAV Manager manager.service /opt/vmware/h4/manager/config/logback.xml [H4-Manager] [%X{operationID}] [%thread] %-40.40logger{39} : %msg
vCAV Replicator replicator.service /opt/vmware/h4/replicator/config/logback.xml [H4-Replicator] [%X{operationID}] [%thread] %-40.40logger{39} : %msg
vCAV Tunnel tunnel.service /opt/vmware/h4/tunnel/config/logback.xml [H4-Tunnel] [%X{operationID}] [%thread] %-40.40logger{39} : %msg

Step 1. Logon to the vCAV appliance (e.g. vCAV Manager) and edit the relevant logback.xml using vi (# vi /opt/vmware/h4/cloud/config/logback.xml) and add the following directly under the <configation> element editing the <syslogHost> to match the IP of the Remote Syslog Daemon and the <suffixPattern> to match the recommended suffix pattern for the service:

<appender name="SYSLOG" class="ch.qos.logback.classic.net.SyslogAppender">
     <suffixPattern>[C4] [%X{operationID}] [%thread] %-40.40logger{39} : %msg</suffixPattern>

Step 2. Locate the element <root level="INFO"> in the logback.xml file and add <appender-ref ref="SYSLOG" /> element below the “FILE” appender.

<root level="INFO">
   <appender-ref ref="FILE" />
   <appender-ref ref="SYSLOG" />

Step 3. The file should appears similar to the below example, save the file and restart the service using the systemctl restart cmd : #systemctl restart cloud.service

Example logback.xml for the cloud.service sending default logging to syslogd @

Step 4. Repeat the process for each of the services and verify on your syslog server that events are being received.

In addition to the application logs the Photon appliance kernel and system logs can also be sent to a remote syslog server by editing the rsyslogd configuration.