LogAnalysis
[logs] Syslog and facilities Jun 06 2007 10:55AM
saudi sans (saudisans gmail com) (4 replies)
Re: [logs] Facility 101 (was: Syslog and facilities) Jun 18 2007 01:04PM
Chris Brenton (cbrenton chrisbrenton org) (1 replies)
On Wed, 2007-06-06 at 16:25 +0530, saudi sans wrote:
>
> Syslog has facilities and levels.
>
> What is the "facility" in syslog ? The level concept is pretty intuitive.

Sorry for the slow re, been totally swamped. Other's have replied but I
thought I would toss in some additional info.

The concept behind facility was to create a general bit bucket for log
entries to go into. The problem is there is very little framework
defined for each entry. For example, should a logon event be recorded as
facility 4 described as "security/authorization messages", or facility
10 which is also described as "security/authorization messages" (there
is no further clarification between the two facilities in the RFC).
You'll find apps like openSSH actually use both. Or maybe it actually
belongs in facility 3 (system daemons) because technically you are
authenticating to a running process. You get the idea, with so much open
to interpretation its easy for messages to end up pretty much anywhere.

The other problem is some of the facilities are a bit dated. For example
there is a facility for FTP (11) but not HTTP. UUCP even has its own
facility (8) but of course no one uses it anymore (I use it for my
Windows stuff. Keeps it from getting mixed in with other log entries ;-)

Finally, we come to the local use facilities (16-23). The concept here
is that these are "private" (kind of like IP addresses) so you can use
them as you please. Of course the problem here is you start running into
conflicts. For example Linux uses local use 7 for its boot up messages.
Apache also uses this facility for its error log reporting. So send all
local use 7 entries to a single log file and you will end up with the
two mixed together. Hard to fix without a pretty severe hack (a conf
file change would be nice but most programmers don't pay that much
attention to logging control).

Now, with all that said, when you are sorting logs its actually the
"priority" that's used by Syslog. Priority is simply:

(facility * 8) + severity = priority

So for example a critical Sendmail error would be: 2x8+2=18

So how you tell your logging server to deal with priority 18
(mail.critical) will decide which log file it ends up in.

> I have a central syslog server where I am aggregating logs from
> several cisco routers and Unix machines.
>
> I have given Level7 as my facility in all cisco routers and Level4 for all Unix
>
> If I am collecting logs remotely does the "facility" field contain
> anything meaningful? Does it make any difference to the log generation
> ? Does it matter if I set Level4 or LevelX?

Yup, see above. Combine your assigned facility with the severity level
and you can sort things as required. Or, you could just simply choose to
do something like the following in syslog.conf:

news.* /var/log/router_stuff
auth.* /var/log/all_unix_stuff

HTH,
Chris

_______________________________________________
LogAnalysis mailing list
LogAnalysis (at) loganalysis (dot) org [email concealed]
http://www.loganalysis.org/mailman/listinfo/loganalysis

[ reply ]
[logs] Syslog and Windows Jun 22 2007 04:35AM
Bill Scherr IV (bschnzl cotse net) (5 replies)
RE: [logs] Syslog and Windows Jun 25 2007 06:54PM
Eric Fitzgerald (Eric Fitzgerald microsoft com) (2 replies)
RE: [logs] Syslog and Windows Jun 25 2007 08:02PM
Rainer Gerhards (rgerhards hq adiscon com) (1 replies)
RE: [logs] Syslog and Windows Jun 25 2007 08:43PM
Eric Fitzgerald (Eric Fitzgerald microsoft com) (1 replies)
RE: [logs] Syslog and Windows Jun 25 2007 09:10PM
Rainer Gerhards (rgerhards hq adiscon com) (1 replies)
RE: [logs] Syslog and Windows Jun 25 2007 09:55PM
Eric Fitzgerald (Eric Fitzgerald microsoft com)
Re: [logs] Syslog and Windows Jun 25 2007 07:59PM
Vincent Bernat (bernat luffy cx) (1 replies)
RE: [logs] Syslog and Windows Jun 26 2007 07:05PM
Eric Fitzgerald (Eric Fitzgerald microsoft com) (1 replies)
RE: [logs] Syslog and Windows Jun 26 2007 08:00PM
Rainer Gerhards (rgerhards hq adiscon com)
Re: [logs] Syslog and Windows Jun 22 2007 05:42AM
David Corlette (dcorlette novell com)
[logs] Re: Syslog and Windows Jun 22 2007 05:11AM
Chris Brenton (cbrenton chrisbrenton org) (1 replies)
[logs] Re: Syslog and Windows Jun 22 2007 10:23AM
Bill Scherr IV (bschnzl cotse net) (1 replies)
RE: [logs] Re: Syslog and Windows Jun 22 2007 06:27PM
Tina Bird (tbird precision-guesswork com) (3 replies)
RE: [logs] Re: Syslog and Windows Jun 23 2007 03:46PM
Chris Brenton (cbrenton chrisbrenton org)
RE: [logs] Re: Syslog and Windows Jun 22 2007 08:41PM
Rainer Gerhards (rgerhards hq adiscon com)
Re: [logs] Re: Syslog and Windows Jun 22 2007 07:15PM
Gord Taylor (taylorgo gmail com) (1 replies)
RE: [logs] Re: Syslog and Windows Jun 22 2007 08:24PM
Rainer Gerhards (rgerhards hq adiscon com) (1 replies)
Re: [logs] Re: Syslog and Windows Jun 25 2007 02:24PM
Gord Taylor (taylorgo gmail com)
Re: [logs] Syslog and Windows Jun 22 2007 05:04AM
John Kinsella (jlk thrashyour com) (2 replies)
RE: [logs] Syslog and Windows Jun 22 2007 10:09AM
Rainer Gerhards (rgerhards hq adiscon com)
Re: [logs] Syslog and Windows Jun 22 2007 08:43AM
Russell Fulton (r fulton auckland ac nz) (1 replies)
Re: [logs] Syslog and Windows Jun 22 2007 03:12PM
John Kinsella (jlk thrashyour com)
Re: [logs] Syslog and Windows Jun 22 2007 04:49AM
Matt Jonkman (jonkman bleedingthreats net)
RE: [logs] Syslog and facilities Jun 06 2007 07:45PM
Rainer Gerhards (rgerhards hq adiscon com)
Re: [logs] Syslog and facilities Jun 06 2007 05:01PM
Marcus J. Ranum (mjr ranum com) (1 replies)
RE: [logs] Syslog and facilities Jun 06 2007 07:40PM
Rainer Gerhards (rgerhards hq adiscon com)
Re: [logs] Syslog and facilities Jun 06 2007 04:40PM
David Corlette (dcorlette novell com)


 

Privacy Statement
Copyright 2010, SecurityFocus