The SocketServer allows live event streaming from any network device. Such inputs include Log4JSocketAppenders, SplunkForwarders or Snare Agents. The incoming stream of events is broken down into subdirectories which reflect the sourceIP and port. Each time a new a new connection is established the directory will be changed. i.e. 192.168.221.01_13000 indicates an incoming stream from the IP_Port combination.
To change the socket server port edit the boot.properties file and append/modify the following
sysprop=-Dsocket.server.port=123456A bounce will be required for this to take effect.
As the stream arrives the contents are inspected and demultiplexed using the mapping.csv file (as attached below). The mapping determines the set of rules which use used to breakdown the stream and write the contents into their relevant locations. This allows for a single stream of data to contain multiple types of data which can be imported into LogScape.
For Example
Aug 23 02:02:43 10.22.111.254 Aug 23 2015 02:03:07: %ASA-5-111008: User 'support' executed the 'enable 15' command.
.../logscape/SocketServer/172.16.101.101/172.16.101.101_50150/ASA/10.22.111.254/ ASA-11Aug23.logThe Datatype would be assosciated with the record by running through the mapping.csv
ASA, timestamp=false,mline=false,appendNL=false,(\d+\.\d+\.\d+\.\d+) AND ASA-\d+
Where
-Dsocket.server.dump.raw=false
The following displays the first couple of lines from a mapping.csv file. The order of the mapping is evaluated from the top down - and is therefore important to ensure the precendence is correct. i.e. more specific rules at the top.
#type-key,#timestamp,#mline=t/f,#flush a NL after receiving lines,# log-line-match-expression (beware of white space!) MSWinEventLog, timestamp=false,mline=false,appendNL=false,(*)\s+MSWinEventLog\s+*\s+(*) ASA-session, timestamp=false,mline=false,appendNL=false,(\d+\.\d+\.\d+\.\d+) AND ASA-session
type-key | MSWinEventLog | Content will be placed into sub directory MSWinEventLog |
timestamp | timestamp = false | if true - each line will be prepended with a timestamp as it arrives |
mline | mline=true | true - Indicates whether or not to expect multiline events(Or very long line lenghts) |
flush | appendNL | - true will append a NL |
expression | (*) | The expression groups are used to recognize content and also determine the subdirectory. Each group () will form part of the path; hence allowing for hostnames, types to be used. |
As the incoming stream is evaluated, the appropriate output files will be streamed into. Any stream of data that is not recognized will be output into an {timestamp}-unknown.log file. By inspecting this file you can see those types not recognized, update the mapping.csv file and then bounce the SocketServer (so it is reconfigured). By default the mapping.csv is located within the system-properties/vs-log-server directory. To make the required changes copy it into the root LogScape directory and edit the file there.