|
Lines 5040-5045
Link Here
|
| 5040 |
be logged to the file specified previously, |
5040 |
be logged to the file specified previously, |
| 5041 |
<filename>/var/log/logclient.log</filename>.</para> |
5041 |
<filename>/var/log/logclient.log</filename>.</para> |
| 5042 |
|
5042 |
|
|
|
5043 |
<para>The server machine must also have the following listing |
| 5044 |
placed inside <filename>/etc/rc.conf</filename>:</para> |
| 5045 |
|
| 5046 |
<programlisting>syslogd_enable="YES" |
| 5047 |
syslogd_flags="-a logclient.example.com -vv"</programlisting> |
| 5048 |
|
| 5049 |
<para>The first option will enable the <command>syslogd</command> |
| 5050 |
daemon on boot up, and the second option allows data from the |
| 5051 |
specified client to be accepted on this server. The latter |
| 5052 |
part, using <option>-vv</option>, will increase the verbosity |
| 5053 |
of logged messages. This is extremely useful for tweaking |
| 5054 |
facilities as administrators are able to see what type of |
| 5055 |
messages are being logged under which facility.</para> |
| 5056 |
|
| 5057 |
<para>Multiple <option>-a</option> options may be specified to |
| 5058 |
allow logging from multiple clients. <acronym>IP</acronym> |
| 5059 |
addresses and whole netblocks may also be specified, see the |
| 5060 |
&man.syslog.3; manual page for a full list of possible |
| 5061 |
options.</para> |
| 5062 |
|
| 5043 |
<para>Finally, the log file should be created. The method used |
5063 |
<para>Finally, the log file should be created. The method used |
| 5044 |
does not matter, but &man.touch.1; works great for situations |
5064 |
does not matter, but &man.touch.1; works great for situations |
| 5045 |
such as this:</para> |
5065 |
such as this:</para> |
|
Lines 5066-5072
Link Here
|
| 5066 |
to a logging server in addition to keeping local copies.</para> |
5086 |
to a logging server in addition to keeping local copies.</para> |
| 5067 |
|
5087 |
|
| 5068 |
<para>Similar to log servers, clients must also meet a few minimum |
5088 |
<para>Similar to log servers, clients must also meet a few minimum |
| 5069 |
requirements.</para> |
5089 |
requirements:</para> |
| 5070 |
|
5090 |
|
| 5071 |
<itemizedlist> |
5091 |
<itemizedlist> |
| 5072 |
<listitem> |
5092 |
<listitem> |
|
Lines 5088-5107
Link Here
|
| 5088 |
</itemizedlist> |
5108 |
</itemizedlist> |
| 5089 |
|
5109 |
|
| 5090 |
<para>Client configuration is a bit more relaxed when compared |
5110 |
<para>Client configuration is a bit more relaxed when compared |
| 5091 |
to that of the servers. The client machine must also have the |
5111 |
to that of the servers. The client machine must have the |
| 5092 |
following listing placed inside |
5112 |
following listing placed inside |
| 5093 |
<filename>/etc/rc.conf</filename>:</para> |
5113 |
<filename>/etc/rc.conf</filename>:</para> |
| 5094 |
|
5114 |
|
| 5095 |
<programlisting>syslogd_enable="YES" |
5115 |
<programlisting>syslogd_enable="YES" |
| 5096 |
syslogd_flags="-a logclient.example.com -vv"</programlisting> |
5116 |
syslogd_flags="-s -vv"</programlisting> |
| 5097 |
|
5117 |
|
| 5098 |
<para>The first option will enable the <command>syslogd</command> |
5118 |
<para>As before, these entries will enable the |
| 5099 |
daemon on boot up, and the second line allows data from the |
5119 |
<command>syslogd</command> daemon on boot up, and increases |
| 5100 |
client to be accepted on this server. The latter part, using |
5120 |
the verbosity of logged messages. The <option>-s</option> |
| 5101 |
<option>-vv</option>, will increase the verbosity of logged |
5121 |
option prevents logs from being accepted by this client from |
| 5102 |
messages. This is extremely useful for tweaking facilities as |
5122 |
other hosts.</para> |
| 5103 |
administrators are able to see what type of messages are being |
|
|
| 5104 |
logged under which facility.</para> |
| 5105 |
|
5123 |
|
| 5106 |
<para>Facilities describe the system part for which a message |
5124 |
<para>Facilities describe the system part for which a message |
| 5107 |
is generated. For an example, <acronym>ftp</acronym> and |
5125 |
is generated. For an example, <acronym>ftp</acronym> and |
|
Lines 5128-5141
Link Here
|
| 5128 |
<screen>&prompt.root; <userinput>/etc/rc.d/syslogd restart</userinput></screen> |
5146 |
<screen>&prompt.root; <userinput>/etc/rc.d/syslogd restart</userinput></screen> |
| 5129 |
|
5147 |
|
| 5130 |
<para>To test that log messages are being sent across the network, |
5148 |
<para>To test that log messages are being sent across the network, |
| 5131 |
use &man.logger.1; to send a message to |
5149 |
use &man.logger.1; on the client to send a message to |
| 5132 |
<command>syslogd</command>:</para> |
5150 |
<command>syslogd</command>:</para> |
| 5133 |
|
5151 |
|
| 5134 |
<screen>&prompt.root; <userinput>logger "Test message from logclient"</userinput></screen> |
5152 |
<screen>&prompt.root; <userinput>logger "Test message from logclient"</userinput></screen> |
| 5135 |
|
5153 |
|
| 5136 |
<para>This message should now exist in |
5154 |
<para>This message should now exist both in |
| 5137 |
<filename>/var/log/messages</filename> on both the client |
5155 |
<filename>/var/log/messages</filename> on the client, and |
| 5138 |
and the server.</para> |
5156 |
<filename>/var/log/logclient.log</filename> on the |
|
|
5157 |
log server.</para> |
| 5139 |
</sect2> |
5158 |
</sect2> |
| 5140 |
|
5159 |
|
| 5141 |
<sect2> |
5160 |
<sect2> |