<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: multikv.conf for data with pipe delimeter in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/multikv-conf-for-data-with-pipe-delimeter/m-p/97251#M97485</link>
    <description>&lt;P&gt;School|Month|SubjectA|SubjectB is the first line in my data and there are no empty lines before.&lt;/P&gt;

&lt;P&gt;my inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///opt/testdata/multikv]
disabled = false
followTail = 0
host = datav1
index = multikv
sourcetype = datav1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;"index=multikv sourcetype=datav1" gives only 1 event which is the 4 lines of my data (1 header, 3 data)&lt;BR /&gt;
&amp;nbsp;&lt;/P&gt;

&lt;P&gt;"index=multikv sourcetype=datav1 | multikv conf=testmultikv | table School Month SubjectA SubjectB" gives "No results found"&lt;BR /&gt;
&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I'm running Splunk 5.0.2, build 149561.&lt;/P&gt;</description>
    <pubDate>Mon, 13 May 2013 00:15:50 GMT</pubDate>
    <dc:creator>Parameshwara</dc:creator>
    <dc:date>2013-05-13T00:15:50Z</dc:date>
    <item>
      <title>multikv.conf for data with pipe delimeter</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/multikv-conf-for-data-with-pipe-delimeter/m-p/97247#M97481</link>
      <description>&lt;P&gt;multikv.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[testmultikv]
pre.linecount    = 1
header.linecount = 1
header.tokens    = _tokenize_, -1, "1"
body.tokens      = _tokenize_, 0, "1"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Sample data file:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;School|Month|Subject_A_Score|Subject_B_Score
SchoolA|January|0|20
SchoolB|January|50|99
SchoolC|January|11|88
...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=xxx | multikv conf=testmultikv | table School Month Subject...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Search results does not pick up the defined fields. What is missing in the configuration file?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2013 07:11:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/multikv-conf-for-data-with-pipe-delimeter/m-p/97247#M97481</guid>
      <dc:creator>Parameshwara</dc:creator>
      <dc:date>2013-04-17T07:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: multikv.conf for data with pipe delimeter</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/multikv-conf-for-data-with-pipe-delimeter/m-p/97248#M97482</link>
      <description>&lt;P&gt;A working configuration for multikv.conf is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[testmultikv]
header.linecount = 1
header.tokens = _tokenize_, -1, "|"
body.tokens = _tokenize_, 0, "|"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;(no pre section, and "|" (pipe) instead of "1" (one))&lt;/P&gt;

&lt;P&gt;And you have to ensure that your whole data file will be indexed as one event, because multikv works on "table-formatted events".&lt;/P&gt;

&lt;P&gt;The whole "table"&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;School|Month|Subject_A_Score|Subject_B_Score
SchoolA|January|0|20
SchoolB|January|50|99
SchoolC|January|11|88
...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;has to be one event.&lt;/P&gt;

&lt;P&gt;You can do this by setting BREAK_ONLY_BEFORE for the sourcetype to a pattern that never match like (?!) and SHOULD_LINEMERGE to true. Depending on your file size (number of lines) you probably also need to increase MAX_EVENTS (default is 500).&lt;/P&gt;

&lt;P&gt;Sample sourcetype definition in props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[schooldata]
SHOULD_LINEMERGE=true
BREAK_ONLY_BEFORE=(?!)
MAX_EVENTS=10000
NO_BINARY_CHECK=1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 May 2013 18:14:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/multikv-conf-for-data-with-pipe-delimeter/m-p/97248#M97482</guid>
      <dc:creator>andreas</dc:creator>
      <dc:date>2013-05-08T18:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: multikv.conf for data with pipe delimeter</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/multikv-conf-for-data-with-pipe-delimeter/m-p/97249#M97483</link>
      <description>&lt;P&gt;multikv.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[testmultikv]
header.linecount = 1
header.tokens = _tokenize_, -1, "|"
body.tokens = _tokenize_, 0, "|"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[datav1]
NO_BINARY_CHECK = 1
SHOULD_LINEMERGE = true
pulldown_type = 1
BREAK_ONLY_BEFORE=(?!)
MAX_EVENTS=100000
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;my data is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;School|Month|SubjectA|SubjectB
SchoolZ|January|0|20
SchoolX|January|50|99
SchoolM|January|11|88
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;my search is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=multikv | multikv conf=testmultikv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What I get is the first data row becomes the field. In 'interesting field' one items appears as SchoolZ|January|0|20.&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2013 05:17:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/multikv-conf-for-data-with-pipe-delimeter/m-p/97249#M97483</guid>
      <dc:creator>Parameshwara</dc:creator>
      <dc:date>2013-05-10T05:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: multikv.conf for data with pipe delimeter</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/multikv-conf-for-data-with-pipe-delimeter/m-p/97250#M97484</link>
      <description>&lt;P&gt;Is this line&lt;BR /&gt;
    School|Month|SubjectA|SubjectB&lt;BR /&gt;
the first line in your data file? No empty line(s) before?&lt;/P&gt;

&lt;P&gt;How does your inputs.conf look like? (Did you use sourcetype=datav1?)&lt;/P&gt;

&lt;P&gt;What is the output of the search&lt;BR /&gt;
    index=multikv sourcetype=datav1&lt;BR /&gt;
(should be one event containing all the data)&lt;/P&gt;

&lt;P&gt;and what is the output of&lt;BR /&gt;
    index=multikv sourcetype=datav1 | multikv conf=testmultikv | table School Month SubjectA SubjectB&lt;/P&gt;

&lt;P&gt;Which Splunk version are you using?&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2013 09:24:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/multikv-conf-for-data-with-pipe-delimeter/m-p/97250#M97484</guid>
      <dc:creator>andreas</dc:creator>
      <dc:date>2013-05-10T09:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: multikv.conf for data with pipe delimeter</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/multikv-conf-for-data-with-pipe-delimeter/m-p/97251#M97485</link>
      <description>&lt;P&gt;School|Month|SubjectA|SubjectB is the first line in my data and there are no empty lines before.&lt;/P&gt;

&lt;P&gt;my inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///opt/testdata/multikv]
disabled = false
followTail = 0
host = datav1
index = multikv
sourcetype = datav1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;"index=multikv sourcetype=datav1" gives only 1 event which is the 4 lines of my data (1 header, 3 data)&lt;BR /&gt;
&amp;nbsp;&lt;/P&gt;

&lt;P&gt;"index=multikv sourcetype=datav1 | multikv conf=testmultikv | table School Month SubjectA SubjectB" gives "No results found"&lt;BR /&gt;
&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I'm running Splunk 5.0.2, build 149561.&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2013 00:15:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/multikv-conf-for-data-with-pipe-delimeter/m-p/97251#M97485</guid>
      <dc:creator>Parameshwara</dc:creator>
      <dc:date>2013-05-13T00:15:50Z</dc:date>
    </item>
  </channel>
</rss>

