<?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 depending on log message type? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-depending-on-log-message-type/m-p/183284#M52781</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a log file consisting of log entries with the following format:&lt;BR /&gt;
data time source message_type optional_qualifier param1, param2,...,param_n&lt;/P&gt;

&lt;P&gt;The parameters value only (i.e. not of the type name=value). What would be the easiest way to extract parameter number 3 or 4 and assign them to a field?&lt;/P&gt;

&lt;P&gt;Dotan&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 18:00:45 GMT</pubDate>
    <dc:creator>dotandvir</dc:creator>
    <dc:date>2020-09-28T18:00:45Z</dc:date>
    <item>
      <title>How to extract fields depending on log message type?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-depending-on-log-message-type/m-p/183284#M52781</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a log file consisting of log entries with the following format:&lt;BR /&gt;
data time source message_type optional_qualifier param1, param2,...,param_n&lt;/P&gt;

&lt;P&gt;The parameters value only (i.e. not of the type name=value). What would be the easiest way to extract parameter number 3 or 4 and assign them to a field?&lt;/P&gt;

&lt;P&gt;Dotan&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:00:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-depending-on-log-message-type/m-p/183284#M52781</guid>
      <dc:creator>dotandvir</dc:creator>
      <dc:date>2020-09-28T18:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields depending on log message type?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-depending-on-log-message-type/m-p/183285#M52782</link>
      <description>&lt;P&gt;Several ways to do it. Using Transforms.conf with delim option.&lt;BR /&gt;
Or use ondemand rex. &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.4/Admin/transformsconf"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.4/Admin/transformsconf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Oct 2014 15:12:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-depending-on-log-message-type/m-p/183285#M52782</guid>
      <dc:creator>Raghav2384</dc:creator>
      <dc:date>2014-10-27T15:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields depending on log message type?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-depending-on-log-message-type/m-p/183286#M52783</link>
      <description>&lt;P&gt;Thank you, do you have a step by step process for doing so? I am a bit confused about what needs to be done in what order.&lt;/P&gt;

&lt;P&gt;Dotan&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2014 08:14:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-depending-on-log-message-type/m-p/183286#M52783</guid>
      <dc:creator>dotandvir</dc:creator>
      <dc:date>2014-10-28T08:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields depending on log message type?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-depending-on-log-message-type/m-p/183287#M52784</link>
      <description>&lt;P&gt;This is very high level example:&lt;BR /&gt;
Sample log: 2012-10-20 15:23:59 abc123|cyz234|xaycvbd|sedghyrd|scvbdg|10002345000&lt;/P&gt;

&lt;P&gt;In my Transforms.conf, this would be the entry&lt;BR /&gt;
[MyStanza]&lt;BR /&gt;
DELIMS = "|"&lt;BR /&gt;
FIELDS = "F001","F002","F003"&lt;BR /&gt;
And then,add ref in &lt;BR /&gt;
Props.conf&lt;BR /&gt;
[MyFields]&lt;BR /&gt;
REPORTS-foo = MyStanza. &lt;/P&gt;

&lt;P&gt;Results, you should have F001 = abc123, F002=cyz234 and so on....&lt;BR /&gt;
Hope this is what you're looking for.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Raghav&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2014 21:28:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-depending-on-log-message-type/m-p/183287#M52784</guid>
      <dc:creator>Raghav2384</dc:creator>
      <dc:date>2014-10-28T21:28:59Z</dc:date>
    </item>
  </channel>
</rss>

