I understand that this is the best way to do it on a static file, but the problem is in the context of a monitored file.
When cron-jobbed output is being appended to the monitored file (the cron can take 1, 2 or up to 10 seconds to finish dumping those 7 lines of output), splunk can "look" at the file mid-way through the event output.
If it determines a match at that perfect time, then it will cut my event short.
Doing a regex match for the total output of the event (to ensure the beginning and end has been finalized and written in total), i wanted to use the event break regex to prevent splunk from detrmining an event has occured by determining that no event has occured until the regex comes back "true".
That is why i am trying to tell it to only consider an event break occured when it sees "Start:" at the top and "End:" at the bottom.
Here's an example of how splunk chops up my event using the normal timestamp method:
I can't seem to post pics yet, here's the listed output of indexed events: See how event was broken up for 2) and 3) ? My script had not yet fully output all there was to output before splunk picked up the "new event". When it next found a match for an event break, it did so (nicely), but it lumped the chunk of ascii between the last match and this match into an event between 2) and 4). Ergo event 2) and event 3) were split. Event 5 and 6 are perfect because I lucked out as to when splunk monitored the file and discovered the new (full) events.
2 4/13/16
12:51:01.000 PM
Start: Wed, 13 Apr 2016 12:51:01 -0400
Starting up poller script.
Database connection established.
Garbage line found, likely the header of the csv. I'm not going to insert.
host = server1 source = /data/poller/poller_v1.log sourcetype = custom_source_type_poller
3 4/13/16
12:46:01.000 PM
Affected Rows: 5
Parsed total lines: 1009
End: Wed, 13 Apr 2016 12:46:01 -0400
host = server1 source = /data/poller/poller_v1.log sourcetype = custom_source_type_poller
4 4/13/16
12:46:01.000 PM
Start: Wed, 13 Apr 2016 12:46:01 -0400
Starting up poller script.
Database connection established.
Garbage line found, likely the header of the csv. I'm not going to insert.
host = server1 source = /data/poller/poller_v1.log sourcetype = custom_source_type_poller
5 4/13/16
12:41:01.000 PM
Start: Wed, 13 Apr 2016 12:41:01 -0400
Starting up poller script.
Database connection established.
Garbage line found, likely the header of the csv. I'm not going to insert.
Affected Rows: 5
Parsed total lines: 1009
End: Wed, 13 Apr 2016 12:41:02 -0400
host = server1 source = /data/poller/poller_v1.log sourcetype = custom_source_type_poller
6 4/13/16
12:36:01.000 PM
Start: Wed, 13 Apr 2016 12:36:01 -0400
Starting up poller script.
Database connection established.
Garbage line found, likely the header of the csv. I'm not going to insert.
Affected Rows: 5
Parsed total lines: 1009
End: Wed, 13 Apr 2016 12:36:02 -0400
host = server1 source = /data/poller/poller_v1.log sourcetype = custom_source_type_poller
... View more