ossp-web/pkg/lib/fsl/faq.wml
#use wml::ossp area=pkg:lib subarea=fsl
<title>OSSP fsl</title>
<h1>Faked/Flexible Syslog</h1>
<h2>Frequently Asked Questions (FAQ)</h2>
This is a list of frequently asked questions and answers about OSSP fsl.
<define-tag faq endtag=required>
<preserve id title>
<set-var %attributes>
<p>
<li><a name="<get-var id>"><get-var title></a>
[<a href="#<get-var id>">A</a>]
<p>
%body
</li>
<restore id title>
</define-tag>
<ol>
<faq id="syslog-setup"
title="I want fsl to forward to syslog. What is the minimum syslog configuration?">
Prepare syslog.conf(5) and keep in mind it wants to see tabs not
spaces, they are marked the output manually to make that clear.
<pre>
$ grep mail.info /etc/syslog.conf
mail.info <b>TAB</b> /var/log/maillog
</pre>
</faq>
<faq id="syslog-debug"
title="I want fsl to forward to syslog. How can i find out if syslog.conf(5) is correct?">
<pre>
$ logger -p mail.info "message"
$ tail /var/log/maillog
Mar 24 17:01:36 host user: message
</pre>
</faq>
<faq id="syslog-l2spec-local"
title="I want fsl to forward to syslog. Which l2spec logs to syslogd locally?">
<pre>
$ echo "from l2, loc" \
| fsl-l2tool 'syslog(facility=mail, ident=info, target="local")'
</pre>
</faq>
<faq id="syslog-l2spec-remote"
title="I want fsl to forward to syslog. Which l2spec logs to syslogd remotely?">
Make sure syslogd accepts network connections, see it's -s option
for syslogd(8) on FreeBSD, -r option for syslogd(8) on Linux or -t
for syslogd(1M) on Solaris. Also note that the l2spec requires a
certain order of the remotehost, remoteport an target
keywords, see <a href="http://cvs.ossp.org/chngview?cn=3313">CVS</a>.
<pre>
$ echo "from l2, net" \
| fsl-l2tool 'syslog(facility=mail,
ident=info,
remotehost="127.0.0.1",
remoteport="514",
target="remote"
)'
</pre>
</faq>
<faq id="syslog-fsl"
title="I want fsl to forward to syslog. Which fsl config logs to syslogd remotely?">
<pre>
##
## fsl.openssh -- OSSP fsl configuration for openssh
##
ident (ssh(d|-.+)?|scp|sftp(-server)?)/.+ q{
prefix(
prefix="%b %d %H:%M:%S %N <%L> $1[%P]: "
)
-> {
debug: file(
path="/usr/opkg/var/openssh/sshd.log",
append=1, perm=0644
);
debug: syslog(
facility=mail, ident=info,
remotehost="127.0.0.1", remoteport="514", target="remote"
)
}
};
##
## fsl.postfix -- OSSP fsl configuration for Postfix
##
ident (postfix/.+)/.+ q{
prefix(
prefix="%b %d %H:%M:%S %N <%L> $1[%P]: "
)
-> {
debug: syslog(
facility=mail,
ident=postfix,
remotehost="127.0.0.1",
remoteport="514",
target="remote"
)
}
};
</pre>
</faq>
<faq id="static-fsl"
title="How can i find out if a statically linked program is using fsl?">
<pre>
$ what <i>/cw12/sbin/postfix</i> | grep 'OSSP fsl'
OSSP fsl 1.0.8 (13-Feb-2003)
</pre>
If you do not have a <tt>what</tt> command use <tt>strings</tt>
<pre>
$ strings <i>/cw12/sbin/postfix</i> | grep '@(#)OSSP fsl'
@(#)OSSP fsl 1.0.8 (13-Feb-2003)
</pre>
Starting with fsl 1.1.0 additional information about configure options is visible
<pre>
OSSP fsl config cfgdir=/cw/etc/fsl prefix=fsl.
</pre>
Starting with fsl 1.1.0 additional information about debugging options is visible
<pre>
OSSP fsl debug logfile=/tmp/fsl/var/fsl/debuglogfile logmask=/tmp/fsl/var/fsl/debuglogmask
</pre>
</faq>
</ol>