Imported Upstream version 2.7
[ossec-hids.git] / doc / logs.txt
1 OSSEC v0.9
2 Copyright (C) 2009 Trend Micro Inc.
3
4
5 OSSEC Logging
6
7 == Introduction ==
8
9 Ossec supports three types of logs. Alert logging, firewall
10 logging and event (archiving) logging.
11
12 Every message received is treated as an event. 
13 Any log message, integrity report, system information will be treated 
14 as such. Event logging is very expensive for the system because
15 it will archive every event. However, they can be usefull to get
16 the big picture if some attack happens.
17
18 Alert logging is the most useful one. An alert is generated when
19 an event is matched against one of the detection rules. In addition
20 to the logging, OSSEC can also generate e-mail notifications or
21 execute external commands for them. 
22
23
24 == Event logging ==
25
26 Inside the OSSEC default log directory (by default /var/ossec/logs) 
27 there is an entry for "archives" (/var/ossec/logs/archives). Inside this
28 directory, all events will be stored by date.
29 For example, all events received on May 22 of 2004, will be stored on:
30
31 /var/ossec/logs/archives/2004/May/events-22.log
32
33 After each day, a hash will be created for this specific day at
34
35 /var/ossec/logs/archives/2004/May/events-22.log.md5
36
37 This hash will be the hash of the file from the day 22 plus the hash
38 from the day 21.
39
40 The hash from the day 1, will be the hash from the day 31 (or 30 or 28)
41 from the previous month.
42
43 This will ensure that no log will be modified. Also, for this to happen,
44 all the logs (since the first day) will need to be modified.
45
46
47 == Alert logging ==
48
49 There will be a "alerts" directory on the OSSEC default logging directory.
50 It will be organized on the same way the event logging is. Please read
51 above to understand it.
52
53