1 ModSecurity Audit Log Collector (mlogc)
3 Mlogc is used to connect a ModSecurity sensor to the central
9 1) Copy the mlogc executable to an appropriate location.
11 A good location might be /usr/local/bin, /opt/mlogc/bin, etc.
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
18 3) Configure the ModSecurity sensor to use mlogc
20 # Use ReleventOnly auditing
21 SecAuditEngine RelevantOnly
23 # Must use concurrent logging
24 SecAuditLogType Concurrent
26 # Send all audit log parts
27 SecAuditLogParts ABIDEFGHZ
29 # Use the same /CollectorRoot/LogStorageDir as in mlogc.conf
30 SecAuditLogStorageDir /var/log/mlogc/data
32 # Pipe audit log to mlogc with your configuration
33 SecAuditLog "|/usr/local/bin/mlogc /etc/mlogc.conf"
35 4) Using the mlogc-default.conf as a template, configure the logger.
37 Typically these are the only directives that will need to be modified
38 to conform to your site:
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.)
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"
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
55 SensorUsername "SENSOR_USERNAME"
56 SensorPassword "SENSOR_PASSWORD"
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.
63 See the mlogc-default.conf configuration file for details on other
64 configuration directives.
66 5) Restart the ModSecurity sensor.
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.
72 To troubleshoot, generate alerts and observe file "mlogc-error.log".
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.