Ce contenu n'est pas disponible dans la langue sélectionnée.
24.6. Enabling the oVirt Engine Extension Logger log4j
Logger implementation requires the ovirt-engine-extension-logger-log4j package. With the implementation, Red Had Virtualization Manager delegates records into log4j. Log4j is a customizable framework that provides appenders for various technologies, including SNMP and syslog.
The oVirt Engine Extension Logger log4j passes the engine.log
files to an existing syslog server. The configuration procedure overlaps with Setting up a Host Logging Server.
Use this procedure on the central syslog server. You can use a separate logging server, or use this procedure to pass the engine.log
files from the Manager to the syslog server.
To define the syslog server for this extension, navigate to the /etc/ovirt-engine/extensions.d directory and edit the value for log4j.appender.myappender.SyslogHost
in the Log4jLogger.properties
file.
To define the syslog facility, navigate to the /etc/ovirt-engine/extensions.d directory and edit the value for log4j.appender.myappender.Facility
in the Log4jLogger.properties
file. For example, log4j.appender.myappender.Facility=local1
.
Configuring the oVirt Engine Extension Logger log4j
Install the extension.
yum install ovirt-engine-extension-logger-log4j
# yum install ovirt-engine-extension-logger-log4j
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create the
Log4jLogger.properties
file in the /etc/ovirt-engine/extensions.d/ directory and include the following contents.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Install and configure rsyslog.
yum install rsyslog
# yum install rsyslog
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure SELinux to allow
rsyslog
traffic.semanage port -a -t syslogd_port_t -p udp 514
# semanage port -a -t syslogd_port_t -p udp 514
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Edit /etc/rsyslog.conf and add the following lines:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Uncomment the following two lines.
#$ModLoad imudp #$UDPServerRun 514
#$ModLoad imudp #$UDPServerRun 514
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the
rsyslog
service:systemctl restart rsyslog.service
# systemctl restart rsyslog.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow If the firewall is enabled and active, run the following command to add the necessary rules for opening the rsyslog ports in Firewalld.
firewall-cmd --permanent --add-port=514/udp firewall-cmd --reload
# firewall-cmd --permanent --add-port=514/udp # firewall-cmd --reload
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart Red Hat Virtualization Manager.
restart ovirt-engine
# restart ovirt-engine
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
The existing syslog server can now receive and store the engine.log
files.