With the recent release of the vCloud Director content pack (v8.4) for vRealize log insight I thought I would put the steps here for how to get this configured.
There are 2 methods to get the logs forwarded to your vRLI server.
- log4j. Setting an additional logger in VCD log4j.properties file.
- Loginsight Agent installed on
Steps to configure Log4j:
- Logging is normally handled by log4j with configuration file /$VCLOUD_HOME/etc/log4j.properties.
- Login to Cell with SSH.
- Change to directory /$VCLOUD_HOME/etc/
- Make backup copy of log4j.properties
- cp log4j.properties log4j.properties.orig
- Open the file log4j.properties in a text editor and add the following lines, where syslog-host-fqdn is the FQDN of your syslog host and port is an optional port number. If no port number specified then will default to 514.
- log4j.appender.vcloud.system.syslog=org.apache.log4j.net.SyslogAppender
- log4j.appender.vcloud.system.syslog.syslogHost=syslog-host-fqdn:port
- Modify this line to add the vCloud Director syslog appenders:
log4j.appender.vcloud.system.syslog.facility=LOCAL1- log4j.appender.vcloud.system.syslog.facility=LOCAL1, log4j.rootLogger=ERROR, vcloud.system.debug, vcloud.system.info, vcloud.system.syslog
- Specify the logger pattern
- #log4j.appender.vcloud.system.syslog.layout=com.vmware.vcloud.logging.layout.CustomPatternLayout
- log4j.appender.vcloud.system.syslog.layout.ConversionPattern=%d{ISO8601} | %-8.8p | %-25.50t | %-30.50c{1} | %m | %x%n
- log4j.appender.vcloud.system.syslog.threshold=INFO
- Save file
- Restart Cell (yes not ideal, so therefore my reason to recommended log inisght agent)
- service vmware-vcd restart
- Repeat on each cell
Steps to configured Log Insight agent: (recommended)
- Install the content pack which is pretty straight forward through the marketplace.
- Verify the agent group for vCloud Director is available after installation.
- Select the agent group and select copy template.
- Provide new name.
- Create filter that limits your specific vCD Cells by either selecting the hostname or IP address to filter by.
- Save
- Install the LI agent on each vCD cell
- Download the agent
- Administration -> Management -> Agents
- At bottom on page you can download the agent
- Copy the Linux RPM file to tmp folder on vCD cell. Good tool to use is WinSCP.
- Install agent
- rpm – U VMware-Log-Insight-Agent-3.3.1-3636434.noarch_10.10.30.74.rpm
- Since we downloaded the agent directly from our log insight server the liagent.ini should already be populated with your server IP Address. This can be verified by reviewing the ini file and looking for hostname entry. cat /etc/liagent.ini
- Download the agent
- You will now see the agent in log insight server. Verify that the agent is filtered correctly for you vCD Active group.
Links: