[9] | 1 | .\" syslog.conf - syslogd(8) configuration file
|
---|
| 2 | .\" Copyright (c) 1995 Martin Schulze <Martin.Schulze@Linux.DE>
|
---|
| 3 | .\" Modified for Minix porting by G. Falzoni <gfalzoni@inwind.it>
|
---|
| 4 | .\" $Id: syslog.conf.5,v 1.1 2006/04/03 14:59:52 beng Exp $
|
---|
| 5 | .\"
|
---|
| 6 | .\" This file is part of the sysklogd package, a kernel and system log daemon.
|
---|
| 7 | .\"
|
---|
| 8 | .\" This program is free software; you can redistribute it and/or modify
|
---|
| 9 | .\" it under the terms of the GNU General Public License as published by
|
---|
| 10 | .\" the Free Software Foundation; either version 2 of the License, or
|
---|
| 11 | .\" (at your option) any later version.
|
---|
| 12 | .\"
|
---|
| 13 | .\" This program is distributed in the hope that it will be useful,
|
---|
| 14 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 15 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 16 | .\" GNU General Public License for more details.
|
---|
| 17 | .\"
|
---|
| 18 | .\" You should have received a copy of the GNU General Public License
|
---|
| 19 | .\" along with this program; if not, write to the Free Software
|
---|
| 20 | .\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
|
---|
| 21 | .\"
|
---|
| 22 | .\" Local macros
|
---|
| 23 | .de Xr
|
---|
| 24 | .BR \\$1 (\\$2)\\$3
|
---|
| 25 | ..
|
---|
| 26 | .de LB
|
---|
| 27 | .TP \\$1
|
---|
| 28 | \\fB\\$2\\fR
|
---|
| 29 | \\$3
|
---|
| 30 | ..
|
---|
| 31 | .de LI
|
---|
| 32 | .TP \\$1
|
---|
| 33 | \\fI\\$2\\fR
|
---|
| 34 | \\$3
|
---|
| 35 | ..
|
---|
| 36 | .de LR
|
---|
| 37 | .TP \\$1
|
---|
| 38 | \\fR\\$2\\fR
|
---|
| 39 | \\$3
|
---|
| 40 | ..
|
---|
| 41 | .\" end local macros
|
---|
| 42 | .TH SYSLOG.CONF 5 "1 January 1998"
|
---|
| 43 | .SH NAME
|
---|
| 44 | syslog.conf \- syslogd(8) configuration file
|
---|
| 45 | .SH DESCRIPTION
|
---|
| 46 | The
|
---|
| 47 | .I syslog.conf
|
---|
| 48 | file is the main configuration file for the
|
---|
| 49 | .Xr syslogd 8
|
---|
| 50 | which logs system messages on *nix systems. This file specifies rules
|
---|
| 51 | for logging. For special features see the
|
---|
| 52 | .Xr syslogd 8
|
---|
| 53 | manpage.
|
---|
| 54 | Every rule consists of two fields, a
|
---|
| 55 | .I selector
|
---|
| 56 | field and an
|
---|
| 57 | .I action
|
---|
| 58 | field. These two fields are separated by one or more tabs.
|
---|
| 59 | The selector field specifies a pattern of facilities and
|
---|
| 60 | priorities belonging to the specified action.
|
---|
| 61 | Lines starting with a hash mark (``#'') and empty lines are ignored.
|
---|
| 62 | .SH SELECTORS
|
---|
| 63 | The selector field itself again consists of two parts, a
|
---|
| 64 | .I facility
|
---|
| 65 | and a
|
---|
| 66 | .IR priority ,
|
---|
| 67 | separated by a period (``.'').
|
---|
| 68 | Both parts are case insensitive and can also be specified as decimal
|
---|
| 69 | numbers, but don't do that, you have been warned. Both facilities and
|
---|
| 70 | priorities are described in
|
---|
| 71 | .BR syslog (3).
|
---|
| 72 | The names mentioned below correspond to the similar
|
---|
| 73 | .BR LOG_ -values
|
---|
| 74 | in
|
---|
| 75 | .IR /usr/include/syslog.h .
|
---|
| 76 | The
|
---|
| 77 | .I facility
|
---|
| 78 | is one of the following keywords:
|
---|
| 79 | .BR auth ", " authpriv ", " cron ", " daemon ", " kern ", " lpr ", "
|
---|
| 80 | .BR mail ", " mark ", " news ", " security " (same as " auth "), "
|
---|
| 81 | .BR syslog ", " user ", " uucp " and " local0 " through " local7 .
|
---|
| 82 | The keyword
|
---|
| 83 | .B security
|
---|
| 84 | should not be used anymore and
|
---|
| 85 | .B mark
|
---|
| 86 | is only for internal use and therefore should not be used in
|
---|
| 87 | applications. Anyway, you may want to specify and redirect these
|
---|
| 88 | messages here. The
|
---|
| 89 | .I facility
|
---|
| 90 | specifies the subsystem that produced the message, i.e. all mail
|
---|
| 91 | programs log with the mail facility
|
---|
| 92 | .BR "" ( LOG_MAIL )
|
---|
| 93 | if they log using syslog.
|
---|
| 94 |
|
---|
| 95 | The
|
---|
| 96 | .I priority
|
---|
| 97 | is one of the following keywords, in ascending order:
|
---|
| 98 | .BR debug ", " info ", " notice ", " warning ", " warn " (same as "
|
---|
| 99 | .BR warning "), " err ", " error " (same as " err "), " crit ", "
|
---|
| 100 | .BR alert ", " emerg ", " panic " (same as " emerg ).
|
---|
| 101 | The keywords
|
---|
| 102 | .BR error ", " warn " and " panic
|
---|
| 103 | are deprecated and should not be used anymore. The
|
---|
| 104 | .I priority
|
---|
| 105 | defines the severity of the message
|
---|
| 106 | .PP
|
---|
| 107 | The behavior of the original BSD syslogd is that all messages of the
|
---|
| 108 | specified priority and higher are logged according to the given
|
---|
| 109 | action. This
|
---|
| 110 | .BR syslogd (8)
|
---|
| 111 | behaves the same, but has some extensions.
|
---|
| 112 | .PP
|
---|
| 113 | In addition to the above mentioned names the
|
---|
| 114 | .BR syslogd (8)
|
---|
| 115 | understands the following extensions:
|
---|
| 116 | .LB 5 "*" "An asterisk (``*'') before the period stands for all facilities.
|
---|
| 117 | .LB 5 "none" "The keyword none stands for no priority of the given facility.
|
---|
| 118 | .PP
|
---|
| 119 | Multiple selectors may be specified for a single
|
---|
| 120 | .I action
|
---|
| 121 | using the semicolon (``;'') separator. Remember that each selector in
|
---|
| 122 | the
|
---|
| 123 | .I selector
|
---|
| 124 | field is capable to overwrite the preceding ones. Using this
|
---|
| 125 | behavior you can exclude some priorities from the pattern.
|
---|
| 126 | .SH ACTIONS
|
---|
| 127 | The action field of a rule describes the abstract term
|
---|
| 128 | ``logfile''. A ``logfile'' need not to be a real file, btw. The
|
---|
| 129 | .Xr syslogd 8
|
---|
| 130 | provides the following actions.
|
---|
| 131 | .SS Regular File
|
---|
| 132 | Typically messages are logged to real files. The file has to be
|
---|
| 133 | specified with full pathname, beginning with a slash ``/''.
|
---|
| 134 | .SS Terminal and Console
|
---|
| 135 | If the file you specified is a tty, special tty-handling is done, same
|
---|
| 136 | with
|
---|
| 137 | .IR /dev/console .
|
---|
| 138 | .SS Remote Machine
|
---|
| 139 | This release does not implement
|
---|
| 140 | remote logging, i.e. the ability to send messages to a remote host running
|
---|
| 141 | .Xr syslogd 8 .
|
---|
| 142 | To forward messages to another host, prepend the hostname
|
---|
| 143 | with the at sign (``@'').
|
---|
| 144 | .SS List of Users
|
---|
| 145 | Usually critical messages are also directed to ``root'' on that
|
---|
| 146 | machine. You can specify a list of users that shall get the message by
|
---|
| 147 | simply writing the login. You may specify more than one user by
|
---|
| 148 | separating them with commas (``,''). If they're logged in they
|
---|
| 149 | get the message. Don't think a mail would be sent, that might be too
|
---|
| 150 | late.
|
---|
| 151 | .SS Everyone logged on
|
---|
| 152 | Emergency messages often go to all users currently online to notify
|
---|
| 153 | them that something strange is happening with the system. To specify
|
---|
| 154 | this
|
---|
| 155 | .IR wall (1)-feature
|
---|
| 156 | use an asterisk (``*'').
|
---|
| 157 | .SH EXAMPLES
|
---|
| 158 | Here are some example, partially taken from a real existing site and
|
---|
| 159 | configuration. Hopefully they rub out all questions to the
|
---|
| 160 | configuration, if not, drop me (Joey) a line.
|
---|
| 161 | .IP
|
---|
| 162 | .nf
|
---|
| 163 | # Store critical stuff in critical
|
---|
| 164 | #
|
---|
| 165 | *.crit /var/adm/critical
|
---|
| 166 | .fi
|
---|
| 167 | .LP
|
---|
| 168 | This will store all messages with the priority
|
---|
| 169 | .B crit
|
---|
| 170 | in the file
|
---|
| 171 | .IR /var/adm/critical .
|
---|
| 172 | .IP
|
---|
| 173 | .nf
|
---|
| 174 | # The tcp wrapper loggs with mail.info, we display
|
---|
| 175 | # all the connections on tty12
|
---|
| 176 | #
|
---|
| 177 | mail.info /dev/tty12
|
---|
| 178 | .fi
|
---|
| 179 | .LP
|
---|
| 180 | This directs all messages that uses
|
---|
| 181 | .BR mail.info " (in source " LOG_MAIL " | " LOG_INFO )
|
---|
| 182 | to
|
---|
| 183 | .IR /dev/tty12 ,
|
---|
| 184 | the 12th console.
|
---|
| 185 | .IP
|
---|
| 186 | .nf
|
---|
| 187 | # Log all mail.info and news.info messages to info
|
---|
| 188 | #
|
---|
| 189 | mail,news.info /var/adm/info
|
---|
| 190 | .fi
|
---|
| 191 | .LP
|
---|
| 192 | This will extract all messages that come either with
|
---|
| 193 | .BR mail.info " or with " news.info
|
---|
| 194 | and store them in the file
|
---|
| 195 | .IR /var/adm/info .
|
---|
| 196 | .IP
|
---|
| 197 | .nf
|
---|
| 198 | # Emergency messages will be displayed using wall
|
---|
| 199 | #
|
---|
| 200 | *.emerg *
|
---|
| 201 | .fi
|
---|
| 202 | .LP
|
---|
| 203 | This rule tells the
|
---|
| 204 | .B syslogd
|
---|
| 205 | to write all emergency messages to all currently logged in users. This
|
---|
| 206 | is the wall action.
|
---|
| 207 | .IP
|
---|
| 208 | .nf
|
---|
| 209 | # Messages of the priority alert will be directed
|
---|
| 210 | # to the operator
|
---|
| 211 | #
|
---|
| 212 | *.alert root,joey
|
---|
| 213 | .fi
|
---|
| 214 | .LP
|
---|
| 215 | This rule directs all messages with a priority of
|
---|
| 216 | .B alert
|
---|
| 217 | or higher to the terminals of the operator, i.e. of the users ``root''
|
---|
| 218 | and ``joey'' if they're logged in.
|
---|
| 219 | .IP
|
---|
| 220 | .nf
|
---|
| 221 | *.* @finlandia
|
---|
| 222 | .fi
|
---|
| 223 | .LP
|
---|
| 224 | This rule would redirect all messages to a remote host called
|
---|
| 225 | finlandia. This is useful especially in a cluster of machines where
|
---|
| 226 | all syslog messages will be stored on only one machine.
|
---|
| 227 | .SH FILES
|
---|
| 228 | .I /etc/syslog.conf
|
---|
| 229 | Configuration file for
|
---|
| 230 | .B syslogd
|
---|
| 231 | .SH BUGS
|
---|
| 232 | The effects of multiple selectors are sometimes not intuitive. For
|
---|
| 233 | example ``mail.crit,*.err'' will select ``mail'' facility messages at
|
---|
| 234 | the level of ``err'' or higher, not at the level of ``crit'' or
|
---|
| 235 | higher.
|
---|
| 236 |
|
---|
| 237 | .SH SEE ALSO
|
---|
| 238 | .BR syslogd (8),
|
---|
| 239 | .BR logger (1),
|
---|
| 240 | .BR syslog (3)
|
---|
| 241 | .SH AUTHORS
|
---|
| 242 | The
|
---|
| 243 | .B syslogd
|
---|
| 244 | is taken from BSD sources, Greg Wettstein (greg@wind.rmcc.com)
|
---|
| 245 | performed the port to Linux, Martin Schulze (joey@linux.de)
|
---|
| 246 | made some bugfixes and added some new features.
|
---|