Import a few changes to the new syslogd chapter which clarifies
some confusion. PR: 130075 Submitted by: Gavin
This commit is contained in:
parent
102988108f
commit
ce79d41d03
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=33591
1 changed files with 33 additions and 14 deletions
|
@ -5040,6 +5040,26 @@ driftfile /var/db/ntp.drift</programlisting>
|
|||
be logged to the file specified previously,
|
||||
<filename>/var/log/logclient.log</filename>.</para>
|
||||
|
||||
<para>The server machine must also have the following listing
|
||||
placed inside <filename>/etc/rc.conf</filename>:</para>
|
||||
|
||||
<programlisting>syslogd_enable="YES"
|
||||
syslogd_flags="-a logclient.example.com -vv"</programlisting>
|
||||
|
||||
<para>The first option will enable the <command>syslogd</command>
|
||||
daemon on boot up, and the second option allows data from the
|
||||
specified client to be accepted on this server. The latter
|
||||
part, using <option>-vv</option>, will increase the verbosity
|
||||
of logged messages. This is extremely useful for tweaking
|
||||
facilities as administrators are able to see what type of
|
||||
messages are being logged under which facility.</para>
|
||||
|
||||
<para>Multiple <option>-a</option> options may be specified to
|
||||
allow logging from multiple clients. <acronym>IP</acronym>
|
||||
addresses and whole netblocks may also be specified, see the
|
||||
&man.syslog.3; manual page for a full list of possible
|
||||
options.</para>
|
||||
|
||||
<para>Finally, the log file should be created. The method used
|
||||
does not matter, but &man.touch.1; works great for situations
|
||||
such as this:</para>
|
||||
|
@ -5066,7 +5086,7 @@ driftfile /var/db/ntp.drift</programlisting>
|
|||
to a logging server in addition to keeping local copies.</para>
|
||||
|
||||
<para>Similar to log servers, clients must also meet a few minimum
|
||||
requirements.</para>
|
||||
requirements:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
|
@ -5088,20 +5108,18 @@ driftfile /var/db/ntp.drift</programlisting>
|
|||
</itemizedlist>
|
||||
|
||||
<para>Client configuration is a bit more relaxed when compared
|
||||
to that of the servers. The client machine must also have the
|
||||
to that of the servers. The client machine must have the
|
||||
following listing placed inside
|
||||
<filename>/etc/rc.conf</filename>:</para>
|
||||
|
||||
<programlisting>syslogd_enable="YES"
|
||||
syslogd_flags="-a logclient.example.com -vv"</programlisting>
|
||||
syslogd_flags="-s -vv"</programlisting>
|
||||
|
||||
<para>The first option will enable the <command>syslogd</command>
|
||||
daemon on boot up, and the second line allows data from the
|
||||
client to be accepted on this server. The latter part, using
|
||||
<option>-vv</option>, will increase the verbosity of logged
|
||||
messages. This is extremely useful for tweaking facilities as
|
||||
administrators are able to see what type of messages are being
|
||||
logged under which facility.</para>
|
||||
<para>As before, these entries will enable the
|
||||
<command>syslogd</command> daemon on boot up, and increases
|
||||
the verbosity of logged messages. The <option>-s</option>
|
||||
option prevents logs from being accepted by this client from
|
||||
other hosts.</para>
|
||||
|
||||
<para>Facilities describe the system part for which a message
|
||||
is generated. For an example, <acronym>ftp</acronym> and
|
||||
|
@ -5128,14 +5146,15 @@ syslogd_flags="-a logclient.example.com -vv"</programlisting>
|
|||
<screen>&prompt.root; <userinput>/etc/rc.d/syslogd restart</userinput></screen>
|
||||
|
||||
<para>To test that log messages are being sent across the network,
|
||||
use &man.logger.1; to send a message to
|
||||
use &man.logger.1; on the client to send a message to
|
||||
<command>syslogd</command>:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>logger "Test message from logclient"</userinput></screen>
|
||||
|
||||
<para>This message should now exist in
|
||||
<filename>/var/log/messages</filename> on both the client
|
||||
and the server.</para>
|
||||
<para>This message should now exist both in
|
||||
<filename>/var/log/messages</filename> on the client, and
|
||||
<filename>/var/log/logclient.log</filename> on the
|
||||
log server.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
|
|
Loading…
Reference in a new issue