Description of problem: Configuration provided in '/usr/share/doc/ovirt-engine-extension-logger-log4j-1.0.2/README' is not very clear to customers. Need configuration steps and specifically examples of configuring RHV to log to syslog. Version-Release number of selected component (if applicable): 4.1.11
1. It should be ovirt.engine.extension.name = XYZ 2. Engine needs to be restarted 3. log4j.appender.myappender.SyslogHost=1.2.3.4 should work just fine 4. In addition to engine logs the log information is sent to syslog as configured 5. Nothing else needs to be changed log4j already has a comprehensive documentation on “%” substitutions here [1] [1] https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html
Moving to Cheryl, if needed feel free to ask if anything is not clear.
# yum install ovirt-engine-extension-logger-log4j create a file /etc/ovirt-engine/extensions.d/Log4jLogger.properties with contents ovirt.engine.extension.name = log4jlogger ovirt.engine.extension.provides = org.ovirt.engine.api.extensions.logger.Logger ovirt.engine.extension.bindings.method = jbossmodule ovirt.engine.extension.binding.jbossmodule.module = org.ovirt.engine-extensions.logger.log4j ovirt.engine.extension.binding.jbossmodule.class = org.ovirt.engineextensions.logger.log4j.Log4jLogger log4j.rootLogger=DEBUG, myappender log4j.appender.myappender=org.apache.log4j.net.SyslogAppender log4j.appender.myappender.SyslogHost=localhost log4j.appender.myappender.layout=org.apache.log4j.PatternLayout log4j.appender.myappender.layout.ConversionPattern=[%c] %m%n Install and configure rsyslog # yum install rsyslog Configure SELinux to allow rsyslog traffic. # semanage port -a -t syslogd_port_t -p udp 514 Edit /etc/rsyslog.conf and add the following lines: $template TmplAuth, "/var/log/%fromhost%/secure" $template TmplMsg, "/var/log/%fromhost%/messages" $RuleSet remote authpriv.* ?TmplAuth *.info,mail.none;authpriv.none,cron.none ?TmplMsg $RuleSet RSYSLOG_DefaultRuleset $InputUDPServerBindRuleset remote Uncomment the following: #$ModLoad imudp #$UDPServerRun 514 Restart the rsyslog service: # systemctl restart rsyslog.service If the firewall is enabled and active, run the below command in order to add the necessary rules for opening rsyslog ports in Firewalld. # firewall-cmd --permanent --add-port=514/udp # firewall-cmd --reload Restart ovirt-engine # systemctl restart ovirt-engine You should see ovirt-engine logs in /var/log/messages
This bug has not been marked as blocker for oVirt 4.3.0. Since we are releasing it tomorrow, January 29th, this bug has been re-targeted to 4.3.1.