<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hello!</p>
<p><br>
</p>
<p>Thank you for your reply. Unfortunately, it does not include the hostname with header=true.</p>
<p>The following is received by the logserver:</p>
<p><br>
</p>
<pre class="ng-scope">{
  &quot;_index&quot;: &quot;ovirt-2016.05.11&quot;,
  &quot;_type&quot;: &quot;syslog&quot;,
  &quot;_id&quot;: &quot;AVSedM6EH9SU2r3j0ihk&quot;,
  &quot;_score&quot;: null,
  &quot;_source&quot;: {
    &quot;message&quot;: &quot;&lt;14&gt;[org.ovirt.engine.core.vdsbroker.HostDevListByCapsVDSCommand] START, HostDevListByCapsVDSCommand(HostName = onodeXXX.some.domain, VdsIdAndVdsVDSCommandParametersBase:{runAsync='true', hostId='XXXXXXXX-XXX-XXXX-XXXX-XXXXXXXXXXX', vds='Host[onodeXXX.some.domain,XXXXXXXX-XXX-XXXX-XXXX-XXXXXXXXXXX]'}), log id: 689d5b30\n&quot;,
    &quot;@version&quot;: &quot;1&quot;,
    &quot;@timestamp&quot;: &quot;2016-05-11T08:15:35.729&#43;02:00&quot;,
    &quot;type&quot;: &quot;syslog&quot;,
    &quot;host&quot;: &quot;10.XXX.XXX.XXX&quot;,
    &quot;tags&quot;: [
      &quot;_grokparsefailure&quot;
    ],
    &quot;syslog_severity_code&quot;: 5,
    &quot;syslog_facility_code&quot;: 1,
    &quot;syslog_facility&quot;: &quot;user-level&quot;,
    &quot;syslog_severity&quot;: &quot;notice&quot;
  },
  &quot;sort&quot;: [
    1462947335729,
    1462947335729
  ]
}</pre>
<p>is it possible to have the IP in the &quot;host&quot; filed have resolved from log4j so that the hostname will be displayed there? Or have it convinced to use the appender.Application field?<br>
</p>
<p><br>
</p>
<p>thank you and best,</p>
<p>&nbsp;Dominique<br>
</p>
<p><br>
</p>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>Von:</b> Ravi Nori &lt;rnori@redhat.com&gt;<br>
<b>Gesendet:</b> Dienstag, 10. Mai 2016 19:04<br>
<b>An:</b> Dominique Taffin<br>
<b>Cc:</b> users@oVirt.org<br>
<b>Betreff:</b> Re: [ovirt-users] Log4j hostname</font>
<div>&nbsp;</div>
</div>
<div>
<div dir="ltr">
<div>
<div>
<div>Hi Dominique,<br>
<br>
</div>
Add<br>
<br>
log4j.appender.myappender.header = true<br>
<br>
</div>
and see if you get the hostname<br>
<br>
</div>
Ravi<br>
<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, May 9, 2016 at 9:37 AM, Dominique Taffin <span dir="ltr">
&lt;<a href="mailto:dominique.taffin@1und1.de" target="_blank">dominique.taffin@1und1.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr" style="font-size:12pt; color:#000000; background-color:#ffffff; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hello!</p>
<p><br>
</p>
<p>We are using the log4j extension&nbsp; to send ovirt logs to a logstash server. </p>
<p>As we do have several engine hosts and only one logging backend, we do need to filter logs by hostname. So far I am unable to provide a hostname in</p>
<p>Log4jLogger.properties. All Log4j configurations we have in other applications/servers to honor the log4j.Application property. I tried setting it up by:</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><a href="http://ovirt.engine.extension.name" target="_blank">ovirt.engine.extension.name</a> = Log4j<br>
ovirt.engine.extension.provides = org.ovirt.engine.api.extensions.logger.Logger<br>
ovirt.engine.extension.bindings.method = jbossmodule<br>
ovirt.engine.extension.binding.jbossmodule.module = org.ovirt.engine-extensions.logger.log4j<br>
ovirt.engine.extension.binding.jbossmodule.class = org.ovirt.engineextensions.logger.log4j.Log4jLogger<br>
log4j.rootLogger=DEBUG, myappender<br>
<br>
log4j.appender.myappender = org.apache.log4j.net.SyslogAppender<br>
log4j.appender.myappender.SyslogHost = logstash-server.something<br>
log4j.appender.myappender.Port = 5544<br>
log4j.appender.myappender.ReconnectionDelay = 60000<br>
log4j.appender.myappender.Application = ovirthostname<br>
log4j.appender.myappender.LocationInfo = true<br>
log4j.appender.myappender.Threshold = DEBUG<br>
log4j.appender.myappender.layout = org.apache.log4j.PatternLayout<br>
log4j.appender.myappender.layout.ConversionPattern=[%c] %m%n<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>Logs do arrive, but no hostname. Can anyone point me out on how to include the hostname in the logs?</p>
<p><br>
</p>
<p>thank you and best,</p>
<p>&nbsp;Dominique<br>
</p>
</div>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@ovirt.org">Users@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</body>
</html>