Refine your search:

I'm writing an app that's based on a scripted input, and I'm trying to just dump out my key value pairs so the field extraction will be handled by autoKV.

someField=bar  someOtherField=12.4

Some of my field values can have space characters in them, but that's OK -- if you dig around in the docs the answer for that is to wrap the values in quotes and then autoKV will be tolerant of space characters:

someField="foo bar" someOtherField="12.4"

However if the field values also contain quote characters, I dont think there's any way to get autoKV to index the value correctly.

eg: someField="foo \" bar"

results a field value of "foo \".

I had hoped that autoKV would be smart enough to extract it as foo " bar, or failing that, as 'foo \" bar'

Any ideas, or do I have to switch to a csv approach?

asked 19 Apr '11, 16:42

nick's gravatar image

nick ♦
14.2k1318
accept rate: 47%

edited 31 May '11, 12:46

jlaw's gravatar image

jlaw ♦
20113


2 Answers:

Nick,

I had success w/ turning off KV and using DELIMS.

## props.conf
[<your_sourcetype>]
KV_MODE = none
REPORT-kv_for_your_sourcetype = kv_for_your_sourcetype

## transforms.conf
[kv_for_wookie]
DELIMS = " ", "="
link

answered 19 Apr '11, 17:56

hazekamp's gravatar image

hazekamp
2.0k11
accept rate: 38%

Thanks hazedav! I'll be back on this tomorrow and I'll give it a shot then.

(20 Apr '11, 22:45) nick ♦

Nick, were you able to work around this using delims, or other? Having the same issue w/ a scripted input.

(29 Apr '11, 10:58) jeffa

I actually havent been able to get back to working on this particular app. Others have been bumped up in priority. I'll probably be back on this next week though and I'll update then at least.

(29 Apr '11, 11:00) nick ♦

This is a known issue and we're working on adding support for escape characters within quoted values in for autokv. Should land in our next major release (5.0)

link

answered yesterday

Ledion%20Bitincka's gravatar image

Ledion Bitincka ♦
1.5k36
accept rate: 34%

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:

×163
×2

Asked: 19 Apr '11, 16:42

Seen: 701 times

Last updated: yesterday

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