<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Backticks work, thanks.<br>
    <br>
    <div class="moz-cite-prefix">On 13/07/2015 12:53, Scheidler, Balázs
      wrote:<br>
    </div>
    <blockquote
cite="mid:CANWQT2NR8WTMnnq39aLLSrw-Jx2V_SxsEzy6HegLigfiNuw+Sw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>Hi,<br>
              <br>
            </div>
            you can use backticks to refer to environment variables. I
            think these were introduced in 3.4.<br>
            <br>
          </div>
          tcp(port(`MY_PORT`))<br>
          <br>
          <br>
        </div>
        <div>It can also use values defined within the configuration
          files using the @define pragma:<br>
          <br>
        </div>
        <div>@define MY_PORT 12345<br>
          <br>
        </div>
        <div>Or something like that.<br>
        </div>
      </div>
      <div class="gmail_extra"><br clear="all">
        <div>
          <div class="gmail_signature">
            <div dir="ltr">-- <br>
              Bazsi<br>
            </div>
          </div>
        </div>
        <br>
        <div class="gmail_quote">On Mon, Jul 13, 2015 at 8:44 AM, Peter
          Flood <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:info@whywouldwe.com" target="_blank">info@whywouldwe.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<br>
            <br>
            I'm trying configure syslog-ng, I'd like to be able to use
            environment<br>
            variables for host &amp; port. I've tried the ones that work
            in the template<br>
            formatter but it's not working (not suprisingly). Is there
            another way?<br>
            <br>
            destination d_my_dest {<br>
                 tcp("$(env MY_HOST)" port($(env MY_PORT))  # this
            doesn't work as<br>
            you can't get env vars unless in a template<br>
                 tls(peer-verify(required-untrusted)
            ca_dir("/etc/syslog-ng/cert.d"))<br>
                 template(myTemplate));<br>
            };<br>
            <br>
            Thanks<br>
______________________________________________________________________________<br>
            Member info: <a moz-do-not-send="true"
              href="https://lists.balabit.hu/mailman/listinfo/syslog-ng"
              rel="noreferrer" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
            Documentation: <a moz-do-not-send="true"
              href="http://www.balabit.com/support/documentation/?product=syslog-ng"
              rel="noreferrer" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
            FAQ: <a moz-do-not-send="true"
              href="http://www.balabit.com/wiki/syslog-ng-faq"
              rel="noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">______________________________________________________________________________
Member info: <a class="moz-txt-link-freetext" href="https://lists.balabit.hu/mailman/listinfo/syslog-ng">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a>
Documentation: <a class="moz-txt-link-freetext" href="http://www.balabit.com/support/documentation/?product=syslog-ng">http://www.balabit.com/support/documentation/?product=syslog-ng</a>
FAQ: <a class="moz-txt-link-freetext" href="http://www.balabit.com/wiki/syslog-ng-faq">http://www.balabit.com/wiki/syslog-ng-faq</a>

</pre>
    </blockquote>
    <br>
  </body>
</html>