Imported Upstream version 2.5.11
[libapache-mod-security.git] / apache2 / mlogc-src / INSTALL
1 ModSecurity Audit Log Collector (mlogc)
2
3 Mlogc is used to connect a ModSecurity sensor to the central
4 audit log repository.
5
6 To Install:
7 ===========
8
9   1) Copy the mlogc executable to an appropriate location.
10
11      A good location might be /usr/local/bin, /opt/mlogc/bin, etc.
12
13   2) Create sensor in the central audit log repository. Note the
14      username and the password (SENSOR_USERNAME, SENSOR_PASSWORD).
15      Also note the IP address central repository listens on
16      (CONSOLE_IP_ADDRESS).
17
18   3) Configure the ModSecurity sensor to use mlogc
19
20      # Use ReleventOnly auditing
21      SecAuditEngine RelevantOnly
22
23      # Must use concurrent logging
24      SecAuditLogType Concurrent
25
26      # Send all audit log parts
27      SecAuditLogParts ABIDEFGHZ
28
29      # Use the same /CollectorRoot/LogStorageDir as in mlogc.conf
30      SecAuditLogStorageDir /var/log/mlogc/data
31
32      # Pipe audit log to mlogc with your configuration
33      SecAuditLog "|/usr/local/bin/mlogc /etc/mlogc.conf"
34
35   4) Using the mlogc-default.conf as a template, configure the logger.
36
37      Typically these are the only directives that will need to be modified
38      to conform to your site:
39
40      # Points to the root of the installation. All relative
41      # paths configured in this file will be resolved with the
42      # help of this path (LogStorageDir, TransactionLog, etc.)
43      #
44      # Typically, this will be the parent directory that is configured
45      # in ModSecurity for the SecAuditLogStorageDirectory.  So, if
46      # your SecAuditLogStorageDirectory is set to /var/log/mlogc/data,
47      # then set this to /var/log/mlogc.
48      CollectorRoot       "/var/log/mlogc"
49
50      # ModSecurity Console receiving URI. You can change the host
51      # and the port parts but leave everything else as is.
52      ConsoleURI          https://CONSOLE_IP_ADDRESS:8886/rpc/auditLogReceiver
53
54      # Sensor credentials
55      SensorUsername      "SENSOR_USERNAME"
56      SensorPassword      "SENSOR_PASSWORD"
57
58      # Base directory where the audit logs are stored.  This can be specified
59      # as a path relative to the CollectorRoot, or a full path.  It should
60      # resolve to the same path as ModSecurity's SecAuditLogStorageDirectory.
61      LogStorageDir       "data"
62
63      See the mlogc-default.conf configuration file for details on other
64      configuration directives.
65
66   5) Restart the ModSecurity sensor.
67
68      From now on every audit log generated will go to the repository. Make
69      sure you create an alert. Transactions without alerts will be recorded
70      but not displayed on the home page.
71      
72      To troubleshoot, generate alerts and observe file "mlogc-error.log".
73      
74      If mlogc fails to connect to the server it will pause for a period
75      of time (60 seconds by default) before it will try again.
76