<?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 fields from hardware sourcetype in unix app in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Extract-fields-from-hardware-sourcetype-in-unix-app/m-p/91191#M18948</link>
    <description>&lt;P&gt;You're looking for a regular expression to parse out each line into a variable fieldname according to the key?&lt;/P&gt;

&lt;P&gt;First, to get the variable fieldname, you need a props.conf and transforms.conf entry like in this question: &lt;A href="http://splunk-base.splunk.com/answers/23409/dynamically-extract-field-names-from-multiline-event"&gt;http://splunk-base.splunk.com/answers/23409/dynamically-extract-field-names-from-multiline-event&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Second, the regular expression would look something like this (untested):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;^([A-Z_]+)\s+(.*)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 18 Jan 2013 08:15:25 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2013-01-18T08:15:25Z</dc:date>
    <item>
      <title>Extract fields from hardware sourcetype in unix app</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-fields-from-hardware-sourcetype-in-unix-app/m-p/91190#M18947</link>
      <description>&lt;P&gt;So the output of hardware.sh (from the Unix app) is something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;KEY                   VALUE
CPU_TYPE              Intel(R) Xeon(R) CPU E5630 @ 2.53GHz
CPU_CACHE             12288 KB
CPU_COUNT             16
HARD_DRIVES           sda (PERC H700) 816 GB; sdb (PERC H800) 18625 GB;
NIC_TYPE              Broadcom NetXtreme II Gigabit
NIC_COUNT             1
MEMORY_REAL           16426668 kB
MEMORY_SWAP           4096564 kB
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is there an easy way to get the key/value pairs into fields properly?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2013 19:50:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-fields-from-hardware-sourcetype-in-unix-app/m-p/91190#M18947</guid>
      <dc:creator>christopher_hod</dc:creator>
      <dc:date>2013-01-17T19:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields from hardware sourcetype in unix app</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-fields-from-hardware-sourcetype-in-unix-app/m-p/91191#M18948</link>
      <description>&lt;P&gt;You're looking for a regular expression to parse out each line into a variable fieldname according to the key?&lt;/P&gt;

&lt;P&gt;First, to get the variable fieldname, you need a props.conf and transforms.conf entry like in this question: &lt;A href="http://splunk-base.splunk.com/answers/23409/dynamically-extract-field-names-from-multiline-event"&gt;http://splunk-base.splunk.com/answers/23409/dynamically-extract-field-names-from-multiline-event&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Second, the regular expression would look something like this (untested):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;^([A-Z_]+)\s+(.*)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Jan 2013 08:15:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-fields-from-hardware-sourcetype-in-unix-app/m-p/91191#M18948</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-01-18T08:15:25Z</dc:date>
    </item>
  </channel>
</rss>

