<p dir="ltr">Only at config parse time.</p>
<p dir="ltr">Regarding the back tick case, are you sure HOSTNAME is set for the syslog-ng process itself? Or is it only set for your interactive shell.</p>
<p dir="ltr">On Linux you can check this in proc, /proc/&lt;pid&gt;/env, but I guess similar exists on freebsd.</p>
<div class="gmail_quote">On Aug 29, 2016 6:17 PM, &quot;Robert Blayzor&quot; &lt;<a href="mailto:rblayzor.bulk@inoc.net">rblayzor.bulk@inoc.net</a>&gt; wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="quoted-text">On Aug 29, 2016, at 11:38 AM, Evan Rempel &lt;<a href="mailto:erempel@uvic.ca">erempel@uvic.ca</a>&gt; wrote:<br>
&gt;<br>
</div><div class="quoted-text">&gt; @module confgen context(rewrite) name(r_myself) exec(&quot;/bin/hostname&quot;)<br>
<br>
<br>
</div>I guess the only remaining question on this is a performance one.<br>
<br>
Would the exec be done for each and every log message or is it done only once?<br>
<div class="quoted-text"><br>
--<br>
Robert<br>
<a href="http://inoc.net" rel="noreferrer" target="_blank">inoc.net</a>!rblayzor<br>
XMPP: <a href="http://rblayzor.AT.inoc.net" rel="noreferrer" target="_blank">rblayzor.AT.inoc.net</a><br>
PGP Key: 78BEDCE1 @ <a href="http://pgp.mit.edu" rel="noreferrer" target="_blank">pgp.mit.edu</a><br>
</div><div class="elided-text">______________________________<wbr>______________________________<wbr>__________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/<wbr>mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/<wbr>support/documentation/?<wbr>product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/<wbr>syslog-ng-faq</a><br>
<br>
</div></blockquote></div>