Refine your search:

1
1

I have a CSV file that lines up fields perfectly in Excel, but when Splunk parses that same CSV data, it gets tripped up when it gets an event with an extra comma in it, even if each field is encapsulated with "quotes" like this:

"5/1/2012 12:15:43 AM","GeneralHostWarningEvent","warning","","USLAB1","Compute HCS","Issue detected on uslab1esxi04, reboot host."

See in the last field, there is a comma before reboot host. This is where Splunk ends that field and then events after this get misaligned.

Is this a bug that should be fixed, or am I going to need to backfill all my data with a force dimlimiter of some other character other than a comma?

Thanks

asked 04 Jun '12, 14:46

virtualpony's gravatar image

virtualpony
613
accept rate: 50%


One Answer:

Your CSV file should work if you put the next line in your stanza in transforms.conf

[Your_stanza] FIELDS="Time","EventType","Priority","somthing","location","client","description" DELIMS=","

[Edit] I did some more research and found out that multiple characters to split the CSV fields is not possible. You can use an regular expression instead to split your fields. [/Edit]

link

answered 06 Jun '12, 08:28

Stefan%20van%20de%20Rijt's gravatar image

Stefan van d...
795
accept rate: 16%

edited 08 Jun '12, 00:23

Thats what my stanza currently looks like.

(06 Jun '12, 08:54) virtualpony
Post your answer
toggle preview

Follow this question

Log In to enable email subscriptions

RSS:

Answers

Answers + Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×180

Asked: 04 Jun '12, 14:46

Seen: 773 times

Last updated: 08 Jun '12, 00:23

Copyright © 2005-2012 Splunk Inc. All rights reserved.