|
If i can pre-process the data... (wrap it in tags or something)... is there a good way to keep data that usually splits into multiple events... have it keep it as one event? |
|
Provided that the data you are trying to consolidate in a single event comes from the same file input and is adjacent (i.e : lines following each other in the source file), what you want to do here is configure line-breaking to merge lines into a single event. The general instructions regarding line-breaking can be found here in our online documentation : http://www.splunk.com/base/Documentation/latest/Admin/Indexmulti-lineevents If you can include tags as delimiters for your events, this will make things easier and you can inform Splunk of this by populating LINE_BREAKER (in props.conf) with the adequate regex. From http://www.splunk.com/base/Documentation/latest/Admin/Propsconf :
There are other settings you may need to specify in your props.conf. Make sure SHOULD_LINEMERGE is set to true :
If you are trying to include more than 256 lines in a single event, make sure that you tweak MAX_EVENTS and TRUNCATE accordingly :
You might find this Splunk Answer interesting, as it most certainly covers your use-case : http://answers.splunk.com/questions/5426/entire-file-contents-as-a-single-event
(16 Sep '10, 18:50)
hexx ♦
|
|
Hello Hiddenkirby, I think the easiest thing to do is preface the event with a well-formatted timestamp:
Then set line breaking rules in props.conf for your data source:
Actually, these are the default settings for any data source so you shouldn't have to add any configuration. Sometimes it's nice to be explicit in your custom config files. It helps make it clear what you are expecting the behavior to be, and protects you if the defaults ever change (due to a config screwup or otherwise)
(16 Sep '10, 18:47)
Lowell ♦
Lowell, that is an excellent suggestion.
(16 Sep '10, 18:51)
hulahoop ♦
|
|
For a practical example of how to index entire files, have a look at this answer. The example indexes entire splunk config files. http://answers.splunk.com/questions/2882/using-fschange-to-monitor-windows-filesystem/3620#3620 |
