Hi All,
Just trying to work out how to use eventgen for multiline logs such as oracles' hideous audit file.
Audit file /ora/app/oracle/admin/cdh/adump/oracle_audit_log.aud
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
ORACLE_HOME = /ora/app/oracle/product/11.2.0.4/db_1
System name: SunOS
Node name: hostname-oracle4
Release: 5.10
Version: Generic_150400-26
Machine: sun4v
Instance name: this_instance
Redo thread mounted by this instance: 1
Oracle process number: 90
Unix process pid: 5542, image: oracle@hostname-oracle4
Mon Nov 2 11:33:30 2015 +11:00
LENGTH: "223"
SESSIONID:[8] "23491997" ENTRYID:[1] "1" USERID:[6] "SIEM_TEST1" ACTION:[3] "44" RETURNCODE:[1] "0" LOGOFF$PREAD:[1] "0" LOGOFF$LREAD:[2] "24" LOGOFF$LWRITE:[1] "0" LOGOFF$DEAD:[1] "0" DBID:[9] "847685182" SESSIONCPU:[1] "4"
Mon Nov 2 11:33:33 2015 +11:00
LENGTH: "223"
SESSIONID:[8] "23491997" ENTRYID:[1] "1" USERID:[6] "SIEM_TEST1" ACTION:[3] "115" RETURNCODE:[1] "0" LOGOFF$PREAD:[1] "0" LOGOFF$LREAD:[2] "24" LOGOFF$LWRITE:[1] "0" LOGOFF$DEAD:[1] "0" DBID:[9] "847685182" SESSIONCPU:[1] "4"
I have tried this in evengen.conf
[oracle_audit_log.aud]
disabled = false
mode = replay
index=sec_database
sourcetype=oracle:audit:text
# breaker= ^\r\n
bundlelines = true
## Generate all events in sample
count = 0
earliest = -5m
latest = now
interval = 300
outputMode=spool
spoolFile = sample.oracle
# host.token
# host.replacement = hosts.list
## Replace timestamp
token.0.token = \w{3}\s+\w{3}\s+\d{1,2}\s+\d{2}:\d{2}:\d{2}\s+\d{4}
token.0.replacementType = timestamp
token.0.replacement = %a %b %d %H:%M:%S %Y
But it throws this error
2015-11-03 13:55:51,350 INFO Retrieving eventgen configurations from /configs/eventgen
2015-11-03 13:55:51,894 INFO Creating timer object for sample 'oracle_audit_log.aud' in app 'TA_ob-3_oracle_eventgen'
2015-11-03 13:55:51,896 INFO Starting timers
2015-11-03 13:55:51,898 ERROR Can't find a timestamp (using patterns '['\\w{3}\\s+\\w{3}\\s+\\d{1,2}\\s+\\d{2}:\\d{2}:\\d{2}\\s+\\d{4}']') in this event: 'LENGTH: "223"
'.
2015-11-03 13:55:51,901 ERROR Exception in sample: oracle_audit_log.aud
Traceback (most recent call last):
File "/opt/splunk/etc/apps/SA-Eventgen/bin/eventgen.py", line 47, in run
partialInterval = self.sample.gen()
File "/opt/splunk/etc/apps/SA-Eventgen/lib/eventgensamples.py", line 506, in gen
self._lastts = self._getTSFromEvent(self._rpevents[self._currentevent])
File "/opt/splunk/etc/apps/SA-Eventgen/lib/eventgensamples.py", line 702, in _getTSFromEvent
raise ValueError("Can't find a timestamp (using patterns '%s') in this event: '%s'." % (formats, event))
ValueError: Can't find a timestamp (using patterns '['\\w{3}\\s+\\w{3}\\s+\\d{1,2}\\s+\\d{2}:\\d{2}:\\d{2}\\s+\\d{4}']') in this event: 'LENGTH: "223"
'.
I'm guessing it is trying to find a timestamp on every line, but obviously one does not exist.
I even tried messing around with breaker.
I even removed all the junk at the top of the log with no luck.
Any ideas would be appreciated.
... View more