public class Collector extends Object
org.modsecurity.console.host=webserver.example.com org.modsecurity.console.port=8886 org.modsecurity.console.user=test org.modsecurity.console.pass=sensor org.modsecurity.collector.concurrent-log=/var/log/apache2/audit org.modsecurity.collector.concurrent-index=/var/log/apache2/audit/indexThis will create a collector that expects all events to be written to unique-files below the directory
/var/log/apache2/audit
and an index written to /var/log/apache2/audit/index.
The events that are read from this place will be sent to a console
running on webserver.example.com at port 8886.
It will authenticate to the console using the login test
and password sensor.
These properties can also be given to the collector tool on the
commandline:
java -Dorg.modsecurity.console.host=webserver.example.com
-Dorg.modsecurity.console.port=8886
-Dorg.modsecurity.console.user=test
...
| Modifier and Type | Field and Description |
|---|---|
static String |
COLLECTOR_CONCURRENT_INDEX |
static String |
COLLECTOR_CONCURRENT_LOG |
static String |
COLLECTOR_CONSOLE_PASSWORD |
static String |
COLLECTOR_CONSOLE_URL |
static String |
COLLECTOR_CONSOLE_USER |
static String |
COLLECTOR_SEND_COMPLETE_LOG |
static String |
COLLECTOR_SERIAL_LOG |
static boolean |
DEBUG
This field enables debug-mode by specifying
-Dorg.modsecurity.Collector.DEBUG=1 on the commandline |
static Properties |
p |
static String |
VERSION |
| Constructor and Description |
|---|
Collector() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkProperties(File pf)
This method checks all the properties, found in the given file
pf. |
static AuditEventReader |
createAuditEventReader()
This method is used to create an AuditEventReader that is
Bsed as the event-source.
|
static String |
getProperty(String key) |
static void |
main(String[] args)
This is the entrypoint for the Collector-tool.
|
public static final String COLLECTOR_SERIAL_LOG
public static final String COLLECTOR_CONCURRENT_LOG
public static final String COLLECTOR_CONCURRENT_INDEX
public static final String COLLECTOR_SEND_COMPLETE_LOG
public static final String COLLECTOR_CONSOLE_URL
public static final String COLLECTOR_CONSOLE_USER
public static final String COLLECTOR_CONSOLE_PASSWORD
public static final String VERSION
public static Properties p
public static final boolean DEBUG
-Dorg.modsecurity.Collector.DEBUG=1 on the commandlinepublic static AuditEventReader createAuditEventReader() throws Exception
AuditEventReader-interface,
like ConcurrentAuditReader or ModSecurity2AuditReader.AuditEventReader-interface.Exception - In case an error occurs or no properties have been set.public static boolean checkProperties(File pf) throws Exception
pf. If the file does not conform to a java-property
file or does not contain the required properties, then
false is returned.
If the file is null, cannot be read or any other error occurs
while reading the file, an exception will be thrown.
The method returns true, iff all required properties
are set within the file.pf - The file to read properties from.true if all required properties are contained in the file.Exception - In case any error occurs while accessing the file.public static void main(String[] args)
args[0] to be the name or path of a property-file
containing information about the remote-console and the source
to read audit-events from.
If the file does not contains the desired information, the
Collector will exit.args - The commandline arguments.Copyright © 2013 jwall.org. All Rights Reserved.