[syslog-ng]FQDN in the destination

Glasser, Rob syslog-ng@lists.balabit.hu
Wed, 30 Apr 2003 14:24:32 -0700


This is a multi-part message in MIME format.

------_=_NextPart_001_01C30F5E.E3D72F46
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

I'm trying to use the fully qualified domain name in my directory naming
structure in a destination function.  Here is what I have:

options {
        dns_cache(yes); (tried without)
        chain_hostnames(no); (tried yes as well)
        keep_hostname(yes); (tried no as well)
        long_hostnames(off); (tried on)
        use_dns(yes); (tried without)
        use_fqdn(yes);
};


Then in the destination I've tried:

destination network_log {
        file("/var/log/syslog-ng/$HOST/$FACILITY.$YEAR$MONTH$DAY"
                owner(root) group(root) perm(0600) dir_perm(0700)
create_dirs(yes)
        );=20
};

and

destination network_log {
        file("/var/log/syslog-ng/$FULLHOST/$FACILITY.$YEAR$MONTH$DAY"
                owner(root) group(root) perm(0600) dir_perm(0700)
create_dirs(yes)
        );=20
};

Neither seems to create a directory with the fqdn, I always end up with
the short name. Am I missing something or does this just not work?

Thanks

Rob

------_=_NextPart_001_01C30F5E.E3D72F46
Content-Type: text/html;
	charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.0.6389.0">
<TITLE>FQDN in the destination</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=3D2 FACE=3D"Arial">I'm trying to use the fully qualified =
domain name in my directory naming structure in a destination =
function.&nbsp; Here is what I have:</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">options {</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
dns_cache(yes); (tried without)</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
chain_hostnames(no); (tried yes as well)</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
keep_hostname(yes); (tried no as well)</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
long_hostnames(off); (tried on)</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; use_dns(yes); =
(tried without)</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
use_fqdn(yes);</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">};</FONT>
</P>
<BR>

<P><FONT SIZE=3D2 FACE=3D"Arial">Then in the destination I've =
tried:</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">destination network_log {</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
file(&quot;/var/log/syslog-ng/$HOST/$FACILITY.$YEAR$MONTH$DAY&quot;</FONT=
>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; owner(root) group(root) perm(0600) =
dir_perm(0700) create_dirs(yes)</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ); </FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">};</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">and</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">destination network_log {</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
file(&quot;/var/log/syslog-ng/$FULLHOST/$FACILITY.$YEAR$MONTH$DAY&quot;</=
FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; owner(root) group(root) perm(0600) =
dir_perm(0700) create_dirs(yes)</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ); </FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">};</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Neither seems to create a directory =
with the fqdn, I always end up with the short name. Am I missing =
something or does this just not work?</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Thanks</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Rob</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C30F5E.E3D72F46--