<?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 How to extract fields from data that has NO key-value pair (data provides just the value) in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-data-that-has-NO-key-value-pair-data/m-p/13470#M1256</link>
    <description>&lt;P&gt;The data below has NO key-value pairs, but the bold data is very important.  If I could somehow extract the bold data below into the following fields, it would be very helpful:&lt;/P&gt;

&lt;P&gt;(in order of boldness, and separated by a space.  the bold data can obviously be different with each log entry, but could also be repeated)&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;PID&lt;/LI&gt;
&lt;LI&gt;Session ID&lt;/LI&gt;
&lt;LI&gt;Request ID&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Any suggestions? &lt;/P&gt;

&lt;P&gt;Thanks, 
     Sean &lt;/P&gt;

&lt;P&gt;BTW - this is a Cognos log&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;P&gt;192.168.27.13:9081  &lt;STRONG&gt;9892&lt;/STRONG&gt;    2010-05-13 04:59:28.439 -6  &lt;STRONG&gt;ECD46F7C56E2D4F6E57931FA643C78980F4264F2&lt;/STRONG&gt;    &lt;STRONG&gt;Ch9v29jvh228Glw8w8jd9M2jwC8M9wMvj448j8s2&lt;/STRONG&gt;    Ch9v29jvh228Glw8w8jd9M2jwC8M9wMvj448j8s2        3104    RSVP    1198    3   Audit.RTUsage.RSVP  Execute Report  /content/folder[@name='Vendor Reports']/folder[@name='Mars']/report[@name='DSVND05 - DISTRIBUTION REPORT XLS']  Success&lt;/P&gt;</description>
    <pubDate>Fri, 14 May 2010 02:22:21 GMT</pubDate>
    <dc:creator>seanlon11</dc:creator>
    <dc:date>2010-05-14T02:22:21Z</dc:date>
    <item>
      <title>How to extract fields from data that has NO key-value pair (data provides just the value)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-data-that-has-NO-key-value-pair-data/m-p/13470#M1256</link>
      <description>&lt;P&gt;The data below has NO key-value pairs, but the bold data is very important.  If I could somehow extract the bold data below into the following fields, it would be very helpful:&lt;/P&gt;

&lt;P&gt;(in order of boldness, and separated by a space.  the bold data can obviously be different with each log entry, but could also be repeated)&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;PID&lt;/LI&gt;
&lt;LI&gt;Session ID&lt;/LI&gt;
&lt;LI&gt;Request ID&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Any suggestions? &lt;/P&gt;

&lt;P&gt;Thanks, 
     Sean &lt;/P&gt;

&lt;P&gt;BTW - this is a Cognos log&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;P&gt;192.168.27.13:9081  &lt;STRONG&gt;9892&lt;/STRONG&gt;    2010-05-13 04:59:28.439 -6  &lt;STRONG&gt;ECD46F7C56E2D4F6E57931FA643C78980F4264F2&lt;/STRONG&gt;    &lt;STRONG&gt;Ch9v29jvh228Glw8w8jd9M2jwC8M9wMvj448j8s2&lt;/STRONG&gt;    Ch9v29jvh228Glw8w8jd9M2jwC8M9wMvj448j8s2        3104    RSVP    1198    3   Audit.RTUsage.RSVP  Execute Report  /content/folder[@name='Vendor Reports']/folder[@name='Mars']/report[@name='DSVND05 - DISTRIBUTION REPORT XLS']  Success&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2010 02:22:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-data-that-has-NO-key-value-pair-data/m-p/13470#M1256</guid>
      <dc:creator>seanlon11</dc:creator>
      <dc:date>2010-05-14T02:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields from data that has NO key-value pair (data provides just the value)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-data-that-has-NO-key-value-pair-data/m-p/13471#M1257</link>
      <description>&lt;P&gt;You can extract this at search time (interactively) using &lt;CODE&gt;rex&lt;/CODE&gt;.  Once you have a good regular expression defined, then you can stick it into your &lt;CODE&gt;props.conf&lt;/CODE&gt; file to match against either a source or sourcetype that this data is found in.  Or, you can use the interactive field extractor.&lt;/P&gt;

&lt;P&gt;Option 1:  Interactive extraction&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search ... | rex "^\S+ (?P&amp;lt;pid&amp;gt;\d+) \S+ \S+ \S+ (?P&amp;lt;session_id&amp;gt;\S+) (?P&amp;lt;request_id&amp;gt;\S+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Options 2:  Setup and entry in props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[my_source_type]
EXTRACT-key_fields = ^\S+ (?P&amp;lt;pid&amp;gt;\d+) \S+ \S+ \S+ (?P&amp;lt;session_id&amp;gt;\S+) (?P&amp;lt;request_id&amp;gt;\S+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Option 3:  Use the interactive field extractor.  See the &lt;A href="http://www.splunk.com/base/Documentation/latest/User/Fieldsextractiontutorial" rel="nofollow"&gt;Fields extraction tutorial&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;Hope that helps you get started.&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2010 02:48:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-data-that-has-NO-key-value-pair-data/m-p/13471#M1257</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-05-14T02:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields from data that has NO key-value pair (data provides just the value)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-data-that-has-NO-key-value-pair-data/m-p/13472#M1258</link>
      <description>&lt;P&gt;You can assign an arbitrary field name as part of a search time extraction. Try something similar to this...&lt;/P&gt;

&lt;P&gt;In ${SPLUNK_HOME}/etc/system/local/transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[cognosfields]
REGEX=^[^\s]+ ([0-9]+) [^\s]+ [^\s]+ [^\s]+ ([^\s]+) ([^\s]+)
FORMAT= pid::$1 sessionid::$2 requestid::$3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In ${SPLUNK_HOME}/etc/system/local/props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[cognos_type]
REPORT-cognos=cognosfields
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Reload the configs by doing a search in the splunkweb UI of "| kv reload=true" - and see if your fields show up.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://www.splunk.com/base/Documentation/4.0.10/Knowledge/Addfieldsatsearchtime#Add_fields_at_search_time_through_configuration_file_edits" rel="nofollow"&gt;http://www.splunk.com/base/Documentation/4.0.10/Knowledge/Addfieldsatsearchtime#Add_fields_at_search_time_through_configuration_file_edits&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2010 02:49:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-data-that-has-NO-key-value-pair-data/m-p/13472#M1258</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2010-05-14T02:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields from data that has NO key-value pair (data provides just the value)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-data-that-has-NO-key-value-pair-data/m-p/13473#M1259</link>
      <description>&lt;P&gt;Presumably this data can be identified by a regular expression or delimiters between fields. In that case, you have a variety of ways to perform extractions. Please see: &lt;A href="http://www.splunk.com/base/Documentation/latest/Knowledge/Addfieldsatsearchtime" rel="nofollow"&gt;http://www.splunk.com/base/Documentation/latest/Knowledge/Addfieldsatsearchtime&lt;/A&gt; and &lt;A href="http://www.splunk.com/base/Documentation/latest/Knowledge/Createandmaintainsearch-timefieldextractionsthroughconfigurationfiles" rel="nofollow"&gt;http://www.splunk.com/base/Documentation/latest/Knowledge/Createandmaintainsearch-timefieldextractionsthroughconfigurationfiles&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2010 02:49:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-data-that-has-NO-key-value-pair-data/m-p/13473#M1259</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-05-14T02:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields from data that has NO key-value pair (data provides just the value)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-data-that-has-NO-key-value-pair-data/m-p/13474#M1260</link>
      <description>&lt;P&gt;Dwaddle, I think you mean &lt;CODE&gt;REPORT-cognos=cognosfields&lt;/CODE&gt;, not &lt;CODE&gt;EXTRACT&lt;/CODE&gt; I think they used to be equivalent in Splunk 3.x, but they aren't in 4.0&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2010 02:53:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-data-that-has-NO-key-value-pair-data/m-p/13474#M1260</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-05-14T02:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields from data that has NO key-value pair (data provides just the value)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-data-that-has-NO-key-value-pair-data/m-p/13475#M1261</link>
      <description>&lt;P&gt;Splunkerific!  Thanks for the help - IFX worked like a charm.&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2010 03:17:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-data-that-has-NO-key-value-pair-data/m-p/13475#M1261</guid>
      <dc:creator>seanlon11</dc:creator>
      <dc:date>2010-05-14T03:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields from data that has NO key-value pair (data provides just the value)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-data-that-has-NO-key-value-pair-data/m-p/13476#M1262</link>
      <description>&lt;P&gt;Right you are... I use REPORT- in all of my configs, but goofed here... /me fixes&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2010 03:21:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-data-that-has-NO-key-value-pair-data/m-p/13476#M1262</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2010-05-14T03:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields from data that has NO key-value pair (data provides just the value)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-data-that-has-NO-key-value-pair-data/m-p/13477#M1263</link>
      <description>&lt;P&gt;As of 4.1.x, the reload command is not necessary - just run another search.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2010 22:49:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-data-that-has-NO-key-value-pair-data/m-p/13477#M1263</guid>
      <dc:creator>Jason</dc:creator>
      <dc:date>2010-10-18T22:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields from data that has NO key-value pair (data provides just the value)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-data-that-has-NO-key-value-pair-data/m-p/13478#M1264</link>
      <description>&lt;P&gt;Just thought I would add the way I did this which can be found in my question here: &lt;A href="http://answers.splunk.com/answers/112243/delimited-field-extractions-for-cognos-data"&gt;http://answers.splunk.com/answers/112243/delimited-field-extractions-for-cognos-data&lt;/A&gt;&lt;BR /&gt;
sometime you can just see the data is separated by tabs and can name the columns rather than using regex! &lt;/P&gt;

&lt;P&gt;Build a transforms as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[cognos-fields]
DELIMS="t"
FIELDS="Host ID","Process ID","Time","Time Zone","Session ID","Request ID","SubRequest ID","Step ID","Thread","Component ID","Build Number","Level","Logger","Operation","Object Type","Object Path","Status","Message","Log Data"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;much easier I find &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2014 11:22:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-data-that-has-NO-key-value-pair-data/m-p/13478#M1264</guid>
      <dc:creator>Pierceyuk</dc:creator>
      <dc:date>2014-02-12T11:22:00Z</dc:date>
    </item>
  </channel>
</rss>

