<?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 to append a value from lookup file to the event based on some condition in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-append-a-value-from-lookup-file-to-the-event-based-on/m-p/404026#M169348</link>
    <description>&lt;P&gt;Please tell us the search sentences and tokens you are using.&lt;/P&gt;</description>
    <pubDate>Wed, 23 May 2018 01:28:15 GMT</pubDate>
    <dc:creator>HiroshiSatoh</dc:creator>
    <dc:date>2018-05-23T01:28:15Z</dc:date>
    <item>
      <title>How to append a value from lookup file to the event based on some condition</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-append-a-value-from-lookup-file-to-the-event-based-on/m-p/404020#M169342</link>
      <description>&lt;P&gt;I have a lookup file in below format&lt;BR /&gt;
Product|R &lt;BR /&gt;
AAAA|/ffff/*&lt;/P&gt;

&lt;P&gt;I have some events i like R="/fff/abc" and  some like R="/ffff/xyz.jsp"&lt;/P&gt;

&lt;P&gt;Using this query i am able to fetch R counts &lt;BR /&gt;
   index=prod* |search [|inputlookup product-dashboard-lookup.csv |fields R ]|stats count as Rcount by R&lt;/P&gt;

&lt;P&gt;Result for the above query is &lt;BR /&gt;
R | Rcount&lt;BR /&gt;
/fff/abc|10&lt;BR /&gt;
/fff/xyz.jsp | 10&lt;/P&gt;

&lt;P&gt;But i would like to get by Product instead of R something like below&lt;/P&gt;

&lt;P&gt;AAAA | 20&lt;/P&gt;

&lt;P&gt;How do i achieve this ?&lt;/P&gt;</description>
      <pubDate>Fri, 18 May 2018 09:05:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-append-a-value-from-lookup-file-to-the-event-based-on/m-p/404020#M169342</guid>
      <dc:creator>sangs8788</dc:creator>
      <dc:date>2018-05-18T09:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to append a value from lookup file to the event based on some condition</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-append-a-value-from-lookup-file-to-the-event-based-on/m-p/404021#M169343</link>
      <description>&lt;P&gt;Try this!&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=prod*  [|inputlookup product-dashboard-lookup.csv |fields R ]
|lookup product-dashboard-lookup.csv R
|stats count as Rcount by ProductName
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 May 2018 09:26:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-append-a-value-from-lookup-file-to-the-event-based-on/m-p/404021#M169343</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2018-05-18T09:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to append a value from lookup file to the event based on some condition</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-append-a-value-from-lookup-file-to-the-event-based-on/m-p/404022#M169344</link>
      <description>&lt;P&gt;Doesnt work since the R has wildcard in lookup file whereas the events contain the actual R.&lt;/P&gt;</description>
      <pubDate>Fri, 18 May 2018 12:39:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-append-a-value-from-lookup-file-to-the-event-based-on/m-p/404022#M169344</guid>
      <dc:creator>sangs8788</dc:creator>
      <dc:date>2018-05-18T12:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to append a value from lookup file to the event based on some condition</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-append-a-value-from-lookup-file-to-the-event-based-on/m-p/404023#M169345</link>
      <description>&lt;P&gt;You can use wild card for LOOKUP.&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/52580/can-we-use-wildcard-characters-in-a-lookup-table.html"&gt;https://answers.splunk.com/answers/52580/can-we-use-wildcard-characters-in-a-lookup-table.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;If the number of cases is small, you can also use MAP.&lt;BR /&gt;
| inputlookup product-dashboard-lookup.csv &lt;BR /&gt;
| map  [search  index=prod* R=$R$|eval ProductName=$ProductName$]&lt;BR /&gt;
| stats count as Rcount by ProductName&lt;BR /&gt;
※We do not consider duplication and number limit.&lt;/P&gt;

&lt;P&gt;It is complicated when there are many cases.&lt;BR /&gt;
Please make your own with reference to the link below.&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/595766/need-to-display-zero-if-count-is-zero-for-data-tha.html"&gt;https://answers.splunk.com/answers/595766/need-to-display-zero-if-count-is-zero-for-data-tha.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 May 2018 15:06:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-append-a-value-from-lookup-file-to-the-event-based-on/m-p/404023#M169345</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2018-05-18T15:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to append a value from lookup file to the event based on some condition</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-append-a-value-from-lookup-file-to-the-event-based-on/m-p/404024#M169346</link>
      <description>&lt;P&gt;Wildcard lookup is the way to go here.&lt;/P&gt;</description>
      <pubDate>Fri, 18 May 2018 15:46:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-append-a-value-from-lookup-file-to-the-event-based-on/m-p/404024#M169346</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-05-18T15:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to append a value from lookup file to the event based on some condition</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-append-a-value-from-lookup-file-to-the-event-based-on/m-p/404025#M169347</link>
      <description>&lt;P&gt;Map does work. But the problem i am facing now is i am unable to add this as one of the panel in the Dashboard. It says "Search is waiting for Input". I guess its becuase of the dynamic parameter passed. How do i make the search as part of a Dashboard ?&lt;/P&gt;</description>
      <pubDate>Mon, 21 May 2018 10:03:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-append-a-value-from-lookup-file-to-the-event-based-on/m-p/404025#M169347</guid>
      <dc:creator>sangs8788</dc:creator>
      <dc:date>2018-05-21T10:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to append a value from lookup file to the event based on some condition</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-append-a-value-from-lookup-file-to-the-event-based-on/m-p/404026#M169348</link>
      <description>&lt;P&gt;Please tell us the search sentences and tokens you are using.&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2018 01:28:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-append-a-value-from-lookup-file-to-the-event-based-on/m-p/404026#M169348</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2018-05-23T01:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to append a value from lookup file to the event based on some condition</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-append-a-value-from-lookup-file-to-the-event-based-on/m-p/404027#M169349</link>
      <description>&lt;P&gt;Below is the query added as a panel to dashboard,&lt;/P&gt;

&lt;P&gt;|inputlookup product-dashboard-lookup.csv |search Product=* AND R=* | map [search host=prod* R="$R$*" |eval Product="$Product$" ]|stats count by Product&lt;/P&gt;

&lt;P&gt;The dashboard contains "Time" as input panel.&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 07:29:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-append-a-value-from-lookup-file-to-the-event-based-on/m-p/404027#M169349</guid>
      <dc:creator>sangs8788</dc:creator>
      <dc:date>2018-05-28T07:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to append a value from lookup file to the event based on some condition</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-append-a-value-from-lookup-file-to-the-event-based-on/m-p/404028#M169350</link>
      <description>&lt;P&gt;I made a grammar mistake. Also escape the double quotes.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup product-dashboard-lookup.csv |search Product=* AND R=*
| map search="search host=prod* R=\"$R$*\" |eval Product=\"$Product$\""
|stats count by Product
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 May 2018 09:35:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-append-a-value-from-lookup-file-to-the-event-based-on/m-p/404028#M169350</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2018-05-28T09:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to append a value from lookup file to the event based on some condition</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-append-a-value-from-lookup-file-to-the-event-based-on/m-p/404029#M169351</link>
      <description>&lt;P&gt;Still no luck. It is still waiting for input&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 09:51:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-append-a-value-from-lookup-file-to-the-event-based-on/m-p/404029#M169351</guid>
      <dc:creator>sangs8788</dc:creator>
      <dc:date>2018-05-28T09:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to append a value from lookup file to the event based on some condition</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-append-a-value-from-lookup-file-to-the-event-based-on/m-p/404030#M169352</link>
      <description>&lt;P&gt;Individually both query works. But it doesnt work when added as a panel in a dashboard&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 09:52:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-append-a-value-from-lookup-file-to-the-event-based-on/m-p/404030#M169352</guid>
      <dc:creator>sangs8788</dc:creator>
      <dc:date>2018-05-28T09:52:16Z</dc:date>
    </item>
  </channel>
</rss>

