<?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 Key Value during search in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Key-Value-during-search/m-p/102215#M21444</link>
    <description>&lt;P&gt;How can this be split into key-value during search?&lt;BR /&gt;
||| --&amp;gt; this marks seperation between key and value&lt;BR /&gt;
for ex: key is TRADE_VALUATION &lt;BR /&gt;
        value is 9926878 EUR ValDate 9/30/13 11:59:59.999 PM EDT &lt;BR /&gt;
XXX  --&amp;gt; marks start of different trade&lt;/P&gt;

&lt;P&gt;TRADE_VALUATION 9926878 EUR ValDate 9/30/13 11:59:59.999 PM EDT ||| NPV (493,855.68) EUR ||| ACCRUAL (-76,527.50) EUR ||| CASH (0.00) EUR ||| NOTIONAL_CURRENT (15,000,000.00) EUR ||| NOTIONAL (15,000,000.00) EUR ||| NPV_MKTING (0.00) USD ||| NPV_PAYLEG (-7,806,133.77) EUR ||| NPV_RECLEG (8,299,989.45) EUR ||| FIXED01 (-32,689.00) EUR ||| PRINCIPAL_EXCHANGE_COUNT (0) EUR XXX Trade_Valuation 10091675 GBP ValDate 9/30/13 11:59:59.999 PM EDT ||| NPV (16,129.78) GBP ||| ACCRUAL (2,755.48) GBP ||| CASH (0.00) GBP ||| NOTIONAL_CURRENT (75,000,000.00) GBP ||| NOTIONAL (75,000,000.00) GBP ||| NPV_MKTING (0.00) USD ||| NPV_PAYLEG (-426,043.90) GBP ||| NPV_RECLEG (442,173.69) GBP ||| FIXED01 (7,469.15) GBP ||| PRINCIPAL_EXCHANGE_COUNT (0) GBP &lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 14:59:34 GMT</pubDate>
    <dc:creator>gudavasr</dc:creator>
    <dc:date>2020-09-28T14:59:34Z</dc:date>
    <item>
      <title>Key Value during search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Key-Value-during-search/m-p/102215#M21444</link>
      <description>&lt;P&gt;How can this be split into key-value during search?&lt;BR /&gt;
||| --&amp;gt; this marks seperation between key and value&lt;BR /&gt;
for ex: key is TRADE_VALUATION &lt;BR /&gt;
        value is 9926878 EUR ValDate 9/30/13 11:59:59.999 PM EDT &lt;BR /&gt;
XXX  --&amp;gt; marks start of different trade&lt;/P&gt;

&lt;P&gt;TRADE_VALUATION 9926878 EUR ValDate 9/30/13 11:59:59.999 PM EDT ||| NPV (493,855.68) EUR ||| ACCRUAL (-76,527.50) EUR ||| CASH (0.00) EUR ||| NOTIONAL_CURRENT (15,000,000.00) EUR ||| NOTIONAL (15,000,000.00) EUR ||| NPV_MKTING (0.00) USD ||| NPV_PAYLEG (-7,806,133.77) EUR ||| NPV_RECLEG (8,299,989.45) EUR ||| FIXED01 (-32,689.00) EUR ||| PRINCIPAL_EXCHANGE_COUNT (0) EUR XXX Trade_Valuation 10091675 GBP ValDate 9/30/13 11:59:59.999 PM EDT ||| NPV (16,129.78) GBP ||| ACCRUAL (2,755.48) GBP ||| CASH (0.00) GBP ||| NOTIONAL_CURRENT (75,000,000.00) GBP ||| NOTIONAL (75,000,000.00) GBP ||| NPV_MKTING (0.00) USD ||| NPV_PAYLEG (-426,043.90) GBP ||| NPV_RECLEG (442,173.69) GBP ||| FIXED01 (7,469.15) GBP ||| PRINCIPAL_EXCHANGE_COUNT (0) GBP &lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:59:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Key-Value-during-search/m-p/102215#M21444</guid>
      <dc:creator>gudavasr</dc:creator>
      <dc:date>2020-09-28T14:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: Key Value during search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Key-Value-during-search/m-p/102216#M21445</link>
      <description>&lt;P&gt;That is a complex question that appears to be wrong.&lt;BR /&gt;
||| appears to separate a key value combination not between a key and value.  The key appears to be the first block of characters after the ||| or XXX.&lt;BR /&gt;
In terms of Splunk, XXX starts a new event with its own timestamp, which is a value itself.&lt;BR /&gt;
The numbers appear to be both with and without () and because they are basically random will not be of use unless they are also extracted as values, which are actually followed by their key.&lt;BR /&gt;
You might want to hire someone to build an app for this.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2013 19:30:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Key-Value-during-search/m-p/102216#M21445</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2013-10-16T19:30:15Z</dc:date>
    </item>
    <item>
      <title>Re: Key Value during search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Key-Value-during-search/m-p/102217#M21446</link>
      <description>&lt;P&gt;or can we split this into key-value in search window:&lt;BR /&gt;
ACCRUAL (-76,527.50) EUR ||| CASH (0.00) EUR &lt;BR /&gt;
like:&lt;/P&gt;

&lt;P&gt;ACCRUAL - (-76,527.50) EUR &lt;BR /&gt;
CASH    - (0.00) EUR &lt;/P&gt;

&lt;P&gt;Thank You.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2013 20:53:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Key-Value-during-search/m-p/102217#M21446</guid>
      <dc:creator>gudavasr</dc:creator>
      <dc:date>2013-10-16T20:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: Key Value during search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Key-Value-during-search/m-p/102218#M21447</link>
      <description>&lt;P&gt;Yes, but it would be such a waste of data that most likely would be useful.&lt;BR /&gt;
Is this data that has already been indexed by Splunk, or is this a 'new' implementation? &lt;BR /&gt;
It matters because you can either configure the sourcetype at index time to allow simple search queries, or you can do nothing at index time and try to manage complex search queries.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2013 23:31:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Key-Value-during-search/m-p/102218#M21447</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2013-10-16T23:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: Key Value during search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Key-Value-during-search/m-p/102219#M21448</link>
      <description>&lt;P&gt;Install Splunk on a Windows OS.&lt;/P&gt;

&lt;P&gt;Create a ‘log’ file that contains the data you posted:&lt;BR /&gt;&lt;BR /&gt;
Create exactly: c:\splunktest\trades\trade.log&lt;BR /&gt;&lt;BR /&gt;
Paste the following test into your new log file:&lt;BR /&gt;&lt;BR /&gt;
TRADE_VALUATION 9926878 EUR ValDate 10/15/13 10:59:59.999 PM EDT ||| NPV (493,855.68) EUR ||| ACCRUAL (-76,527.50) EUR ||| CASH (0.00) EUR ||| NOTIONAL_CURRENT (15,000,000.00) EUR ||| NOTIONAL (15,000,000.00) EUR ||| NPV_MKTING (0.00) USD ||| NPV_PAYLEG (-7,806,133.77) EUR ||| NPV_RECLEG (8,299,989.45) EUR ||| FIXED01 (-32,689.00) EUR ||| PRINCIPAL_EXCHANGE_COUNT (0) EUR XXX Trade_Valuation 10091675 GBP ValDate 10/15/13 10:59:59.999 PM EDT ||| NPV (16,129.78) GBP ||| ACCRUAL (2,755.48) GBP ||| CASH (0.00) GBP ||| NOTIONAL_CURRENT (75,000,000.00) GBP ||| NOTIONAL (75,000,000.00) GBP ||| NPV_MKTING (0.00) USD ||| NPV_PAYLEG (-426,043.90) GBP ||| NPV_RECLEG (442,173.69) GBP ||| FIXED01 (7,469.15) GBP ||| PRINCIPAL_EXCHANGE_COUNT (0) GBP&lt;/P&gt;

&lt;P&gt;Create a new index:&lt;BR /&gt;&lt;BR /&gt;
Log into Splunk and from Manager&amp;gt;Indexes&amp;gt;Add New&lt;BR /&gt;&lt;BR /&gt;
In Index Name enter ‘market’ without quotes.&lt;/P&gt;

&lt;P&gt;Create a new input:&lt;BR /&gt;&lt;BR /&gt;
From Windows Explorer open c:\program files\splunk\etc\apps\learned&lt;BR /&gt;&lt;BR /&gt;
Create a new folder called ‘local’&lt;BR /&gt;&lt;BR /&gt;
In the local folder, create a new file in the folder called ‘inputs.conf’ Note: Verify with Properties that the file extension is .conf not .txt&lt;BR /&gt;&lt;BR /&gt;
Add the following text (case sensitive) to your new inputs.conf and save the file:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://c:\splunktest\trades\trade.log]
sourcetype = trades
index = market
followTail = 0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Create a new sourcetype:&lt;BR /&gt;&lt;BR /&gt;
From Windows Explorer open c:\program files\splunk\etc\apps\learned\local&lt;BR /&gt;&lt;BR /&gt;
Create a new file called props.conf  Note: Verify with Properties that the file extension is .conf not .txt&lt;BR /&gt;&lt;BR /&gt;
Add the following text (case sensitive) to your new props.conf and save the file:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[trades]
LINE_BREAKER = (?msi)\s(XXX)\s
TIME_PREFIX = ValDate\s
MAX_TIMESTAMP_LOOKAHEAD = 32
TIME_FORMAT = %D%t%I:%M:%S.%N%t%p%t%Z
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Restart Splunk:&lt;BR /&gt;&lt;BR /&gt;
Login to Splunk, from Manager&amp;gt;Server Controls select Restart Splunk and confirm.&lt;/P&gt;

&lt;P&gt;Login to Splunk.&lt;BR /&gt;&lt;BR /&gt;
Run this search in App&amp;gt;Search, and from the time picker on the right select All Time from the drop down menu.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=market | rex field=_raw "(?msi)Trade_Valuation\s(?&amp;lt;TradeValuation&amp;gt;\d+)\s(?&amp;lt;TradeValueCurrency&amp;gt;\w+)\s.*" |table _time,TradeValuation,TradeValueCurrency
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note: The time is sensitive to your users default time.  To set user time go to Manager &amp;gt; Access Controls &amp;gt; Users &amp;gt; select your user, and set the time zone.&lt;/P&gt;

&lt;P&gt;No applause please, just throw money &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:00:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Key-Value-during-search/m-p/102219#M21448</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2020-09-28T15:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: Key Value during search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Key-Value-during-search/m-p/102220#M21449</link>
      <description>&lt;P&gt;Thank you; will try this.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2013 19:31:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Key-Value-during-search/m-p/102220#M21449</guid>
      <dc:creator>gudavasr</dc:creator>
      <dc:date>2013-10-22T19:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: Key Value during search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Key-Value-during-search/m-p/102221#M21450</link>
      <description>&lt;P&gt;By the way, this is the hard way.  The extractions are done by hand at search time.&lt;BR /&gt;
If I get time, I'll see if I can configure Splunk to extract the fields in the background.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2013 19:39:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Key-Value-during-search/m-p/102221#M21450</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2013-10-22T19:39:47Z</dc:date>
    </item>
  </channel>
</rss>

