Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

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.

Note

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

  1. Install the extension.

    # yum install ovirt-engine-extension-logger-log4j
    Copy to Clipboard Toggle word wrap
  2. Create the Log4jLogger.properties file in the /etc/ovirt-engine/extensions.d/ directory and include the following 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
    Copy to Clipboard Toggle word wrap
  3. Install and configure rsyslog.

    # yum install rsyslog
    Copy to Clipboard Toggle word wrap
  4. Configure SELinux to allow rsyslog traffic.

    # semanage port -a -t syslogd_port_t -p udp 514
    Copy to Clipboard Toggle word wrap
  5. 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
    Copy to Clipboard Toggle word wrap
  6. Uncomment the following two lines.

    #$ModLoad imudp
    #$UDPServerRun 514
    Copy to Clipboard Toggle word wrap
  7. Restart the rsyslog service:

    # systemctl restart rsyslog.service
    Copy to Clipboard Toggle word wrap
  8. 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
    Copy to Clipboard Toggle word wrap
  9. Restart Red Hat Virtualization Manager.

    # restart ovirt-engine
    Copy to Clipboard Toggle word wrap

The existing syslog server can now receive and store the engine.log files.

Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat