<?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: How do I parse a value from a log message? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-parse-a-value-from-a-log-message/m-p/84989#M182093</link>
    <description>&lt;P&gt;I don't particularly, I'm new to splunk and trying to workout what's the best way to extract the data i want&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jul 2013 13:59:16 GMT</pubDate>
    <dc:creator>oriches</dc:creator>
    <dc:date>2013-07-04T13:59:16Z</dc:date>
    <item>
      <title>How do I parse a value from a log message?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-parse-a-value-from-a-log-message/m-p/84985#M182089</link>
      <description>&lt;P&gt;I have the log messages in the following structure, the one shown represents a heardbeat from the application.&lt;/P&gt;

&lt;P&gt;How can I parse the ProcessMemory(KB) value?&lt;/P&gt;

&lt;P&gt;or &lt;/P&gt;

&lt;P&gt;Is it best to change the log message structure so all values use an equals '=' as a seperator?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TimeStamp=2013-07-04 13:48:45.733 +01:00 | UserInterface | Level=Info | Spec=UserInterface | Level=Debug | Spec=Heartbeat | Attributes=Status:Running, Utilisation(%):2, AvailableMemory(KB):10076160, ProcessUtilisation(%):0, ProcessMemory(KB):194668, ProcessPeakMemory(KB):194732, ProcessorCount:12 | Type=Heartbeat | SessionId=8d26ee12-f40f-471d-bea4-5836fce72362 | ThreadName=61 | Status=Instant
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Jul 2013 13:00:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-parse-a-value-from-a-log-message/m-p/84985#M182089</guid>
      <dc:creator>oriches</dc:creator>
      <dc:date>2013-07-04T13:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I parse a value from a log message?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-parse-a-value-from-a-log-message/m-p/84986#M182090</link>
      <description>&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.3/Search/Extractfieldswithsearchcommands"&gt;Extract Fields with search commands&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.3/Knowledge/Managesearch-timefieldextractions"&gt;Manage Search Time Field Extractions&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2013 13:33:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-parse-a-value-from-a-log-message/m-p/84986#M182090</guid>
      <dc:creator>Linegod</dc:creator>
      <dc:date>2013-07-04T13:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do I parse a value from a log message?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-parse-a-value-from-a-log-message/m-p/84987#M182091</link>
      <description>&lt;P&gt;You don't necessarily need to.  Use the field definition tool on sample data.  Select the drop-down arrow against any sample log entry, take the "extract field" option, and follow through the dialogue.  This will (attempt to) automatically created a regex for reliably locating your required field.  You may need to refine the regex manually if the generated form pulls unexpected values from unintended records, but you have ample opportunity to refine and test.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2013 13:35:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-parse-a-value-from-a-log-message/m-p/84987#M182091</guid>
      <dc:creator>grijhwani</dc:creator>
      <dc:date>2013-07-04T13:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: How do I parse a value from a log message?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-parse-a-value-from-a-log-message/m-p/84988#M182092</link>
      <description>&lt;P&gt;Why would you want to change the separator to "=" that's already in use within the logging. In terms of the log itself, they have different structure relevance.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2013 13:55:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-parse-a-value-from-a-log-message/m-p/84988#M182092</guid>
      <dc:creator>MHibbin</dc:creator>
      <dc:date>2013-07-04T13:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: How do I parse a value from a log message?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-parse-a-value-from-a-log-message/m-p/84989#M182093</link>
      <description>&lt;P&gt;I don't particularly, I'm new to splunk and trying to workout what's the best way to extract the data i want&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2013 13:59:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-parse-a-value-from-a-log-message/m-p/84989#M182093</guid>
      <dc:creator>oriches</dc:creator>
      <dc:date>2013-07-04T13:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do I parse a value from a log message?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-parse-a-value-from-a-log-message/m-p/84990#M182094</link>
      <description>&lt;P&gt;The best way to extract these values is to group the desired field name and corresponding value, detached by the delimiter. To preserve the actual field name as closely as possible, a regular expression will help. &lt;/P&gt;

&lt;P&gt;In your props.conf define a report&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#props.conf
[answers-1372947346]
REPORT-get_perf_fields = get_perf_fields
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In transforms.conf define the extraction method:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#transforms.conf
[get_perf_fields]
REGEX = ([a-zA-Z\(\)\%]+)\:([a-zA-Z0-9]+)
FORMAT = $1::$2
MV_ADD = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This should automatically load the fields at search time. Note that the non-alphabetic characters will be replaced with an underscore character. That means &lt;CODE&gt;ProcessUtilisation(%)&lt;/CODE&gt; will become &lt;CODE&gt;ProcessUtilisation___&lt;/CODE&gt;.&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;
&lt;IMG src="http://splunk-base.splunk.com//storage/Untitled700.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;BR /&gt;&lt;/P&gt;

&lt;P&gt;PS: If you are unsure as to where to place the props.conf or transforms.conf files, open or create them under $SPLUNK_HOME/etc/apps/search/local/ in Linux/UNIX or %SPLUNK_HOME%\etc\apps\local in Windows.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2013 14:58:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-parse-a-value-from-a-log-message/m-p/84990#M182094</guid>
      <dc:creator>Gilberto_Castil</dc:creator>
      <dc:date>2013-07-04T14:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I parse a value from a log message?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-parse-a-value-from-a-log-message/m-p/84991#M182095</link>
      <description>&lt;P&gt;You do not need to change the separator. This is known as Semantic Logging and it is a recommended approach not just for Splunk but as a general best practice. Splunk will automatically recognize key value pairs with an equals delimiter. Splunk is very flexible and will work with what you have, regardless of the format.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2013 15:06:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-parse-a-value-from-a-log-message/m-p/84991#M182095</guid>
      <dc:creator>Gilberto_Castil</dc:creator>
      <dc:date>2013-07-04T15:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I parse a value from a log message?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-parse-a-value-from-a-log-message/m-p/84992#M182096</link>
      <description>&lt;P&gt;hi in my splunk sonic firewall log the source address with source port in single header so how to do parse . (Example. src:192.168.1.2:5545:XA1) I WANT( SOURCE ADDRESS=192.168.1.2  SOURCE PORT 5545 OTHER XA1) kindly suggest how to do ..?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 05:34:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-parse-a-value-from-a-log-message/m-p/84992#M182096</guid>
      <dc:creator>venki08</dc:creator>
      <dc:date>2016-07-26T05:34:31Z</dc:date>
    </item>
  </channel>
</rss>

