<?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: Extract a Value from a Field in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Extract-a-Value-from-a-Field/m-p/92607#M19224</link>
    <description>&lt;P&gt;You do this easily with props and transforms. Your props.conf will look something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[host_from_message]
SOURCE_KEY = Message
REGEX = The session setup from computer '(.+)' failed because the security
FORMAT = hostname::"$1"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;With a transforms.conf entry like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your_sourcetype]
REPORT-host_from_message = host_from_message
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As @Ayn said, check the docs out. They are very helpful.&lt;/P&gt;</description>
    <pubDate>Sat, 13 Apr 2013 03:10:30 GMT</pubDate>
    <dc:creator>LukeMurphey</dc:creator>
    <dc:date>2013-04-13T03:10:30Z</dc:date>
    <item>
      <title>Extract a Value from a Field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-a-Value-from-a-Field/m-p/92604#M19221</link>
      <description>&lt;P&gt;Terminology might be off, but I'll give the exact example: &lt;BR /&gt;
"The session setup from computer 'NOCSERVER_A123' failed because the security....."  and so on.  This is a field called "Message" and I would like to assign "NOCSERVER_A123" to it's own field called Hostname.  My intention is that when I search, my query returns just the Hostname, and not the entire "Message" field.&lt;/P&gt;

&lt;P&gt;I've tried a few different things to no luck, and I believe the problem is I have a very basic grasp on how to achieve this.  I would really appreciate if someone could clear up how to do this, and if possible, explain it a little or give me links to some documentation/tutorial pages.  I feel like what I've been doing with the transform.conf and props.conf are incorrect.  &lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:43:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-a-Value-from-a-Field/m-p/92604#M19221</guid>
      <dc:creator>corydm</dc:creator>
      <dc:date>2020-09-28T13:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: Extract a Value from a Field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-a-Value-from-a-Field/m-p/92605#M19222</link>
      <description>&lt;P&gt;Have you tried defining a field extraction with regex?&lt;/P&gt;

&lt;P&gt;Something like this might help you:&lt;BR /&gt;
  '(?&lt;FIELD_NAME&gt;[^']+)'&lt;/FIELD_NAME&gt;&lt;/P&gt;

&lt;P&gt;This would extract everything between two single quotes, that isn't a single quote into a field called "FIELD_NAME". You may have to escape the single quotes, I'm not 100% sure on that bit.&lt;/P&gt;

&lt;P&gt;If your hostname isn't always contained within single quotes then you would have to play around with regex to identify the exact expression in which to extract your hostnames.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2013 20:03:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-a-Value-from-a-Field/m-p/92605#M19222</guid>
      <dc:creator>aholzer</dc:creator>
      <dc:date>2013-04-12T20:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Extract a Value from a Field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-a-Value-from-a-Field/m-p/92606#M19223</link>
      <description>&lt;P&gt;I think the docs explain it pretty well: &lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.2/Knowledge/Addfieldsatsearchtime"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.2/Knowledge/Addfieldsatsearchtime&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2013 20:20:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-a-Value-from-a-Field/m-p/92606#M19223</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-04-12T20:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: Extract a Value from a Field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-a-Value-from-a-Field/m-p/92607#M19224</link>
      <description>&lt;P&gt;You do this easily with props and transforms. Your props.conf will look something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[host_from_message]
SOURCE_KEY = Message
REGEX = The session setup from computer '(.+)' failed because the security
FORMAT = hostname::"$1"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;With a transforms.conf entry like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your_sourcetype]
REPORT-host_from_message = host_from_message
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As @Ayn said, check the docs out. They are very helpful.&lt;/P&gt;</description>
      <pubDate>Sat, 13 Apr 2013 03:10:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-a-Value-from-a-Field/m-p/92607#M19224</guid>
      <dc:creator>LukeMurphey</dc:creator>
      <dc:date>2013-04-13T03:10:30Z</dc:date>
    </item>
  </channel>
</rss>

