The logging for each Cloud Director Availability service is controlled by a
logback.xml file. To forward the Cloud Director Availability logs to a syslog server, you need to update this file for each service individually. The location of the file for each service is:
Service | Default Location |
---|
Cloud Service | /opt/vmware/h4/cloud/config/logback.xml |
Manager Service | /opt/vmware/h4/manager/config/logback.xml |
Replicator Service | /opt/vmware/h4/replicator/config/logback.xml |
Tunnel Service | /opt/vmware/h4/tunnel/config/logback.xml |
To forward the Cloud Director Availability logs to a syslog server perform the following steps:
- SSH to the Cloud Director Availability component VM whose logs you want to forward.
- Navigate to the /opt/vmware/h4/service/config/ directory.
- Create a backup of the logback.xml file.
cp -p logback.xml logback.xml.bak
- Add the following to the configuration section of the logback.xml file above the root section:
<appender name="SYSLOG" class="ch.qos.logback.classic.net.SyslogAppender">
<syslogHost>syslogIpAddress</syslogHost>
<port>514</port>
<facility>LOCAL7</facility>
<suffixPattern>[C4] [%X{operationID}] [%thread] %-40.40logger{39}: %msg</suffixPattern>
</appender>
- Register the new appender by adding the following line to the root section of the logback.xml file:
<appender-ref ref="SYSLOG" />
- Save and exit the logback.xml file.
- Log into the management portal for the service.
- In the left pane, click System Monitoring.
- Under System health, click Restart Service.