<?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: Using lookup (.csv file) to  filter events in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-lookup-csv-file-to-filter-events/m-p/222273#M65357</link>
    <description>&lt;P&gt;From where you can get the user name when you say you can pull from the host name? Is there a mapping exists which relates host with user?&lt;/P&gt;</description>
    <pubDate>Tue, 10 Jan 2017 05:46:34 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2017-01-10T05:46:34Z</dc:date>
    <item>
      <title>Using lookup (.csv file) to  filter events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-lookup-csv-file-to-filter-events/m-p/222266#M65350</link>
      <description>&lt;P&gt;I am creating a new post, as though I found similar questions but could not get the right solution. &lt;/P&gt;

&lt;P&gt;I want to run a query where I can filter events using lookup file. As the file contains a list of application name it will keep adding.  So I created .csv file and lookup table, lookup definition. &lt;/P&gt;

&lt;P&gt;File name is file1.csv&lt;BR /&gt;
Note: In my .csv file there is only one column and it looks like below:  File name is file1.csv&lt;/P&gt;

&lt;P&gt;Application ( It is the column header)&lt;BR /&gt;
Paint&lt;BR /&gt;
abc*&lt;BR /&gt;
xyz*&lt;BR /&gt;
aaa*&lt;/P&gt;

&lt;P&gt;Query is &lt;BR /&gt;
index="index_name" [ | inputlookup "file1.csv" | fields Application ] | table field1, field2&lt;/P&gt;

&lt;P&gt;The above query didn't fetch any result. &lt;/P&gt;

&lt;P&gt;Anything I am missing. Kindly help.  I really will be thankful if someone can provide the solution. &lt;/P&gt;

&lt;P&gt;Thanks &amp;amp; Regards,&lt;BR /&gt;
Binay Agarwal &lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2017 04:54:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-lookup-csv-file-to-filter-events/m-p/222266#M65350</guid>
      <dc:creator>bagarwal</dc:creator>
      <dc:date>2017-01-06T04:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Using lookup (.csv file) to  filter events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-lookup-csv-file-to-filter-events/m-p/222267#M65351</link>
      <description>&lt;P&gt;The above syntax expects there is a field called Application in your events. &lt;/P&gt;

&lt;P&gt;IF you don't have that field and want to do text based search, try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="index_name" [ | inputlookup "file1.csv" | table Application | rename Application as search ] | table field1, field2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you have a field which contains this Application values, but have different name, try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="index_name" [ | inputlookup "file1.csv" | table Application | rename Application as FieldNameInYourEvents] | table field1, field2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Jan 2017 05:04:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-lookup-csv-file-to-filter-events/m-p/222267#M65351</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-01-06T05:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using lookup (.csv file) to  filter events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-lookup-csv-file-to-filter-events/m-p/222268#M65352</link>
      <description>&lt;P&gt;Hi @somesoni2, &lt;/P&gt;

&lt;P&gt;Thank You so much.  This is exactly needed &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; A BIG THANK YOU once again. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;

&lt;P&gt;Best Regards,&lt;BR /&gt;
Binay Agarwal &lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2017 05:47:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-lookup-csv-file-to-filter-events/m-p/222268#M65352</guid>
      <dc:creator>bagarwal</dc:creator>
      <dc:date>2017-01-06T05:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: Using lookup (.csv file) to  filter events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-lookup-csv-file-to-filter-events/m-p/222269#M65353</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;Now since I am getting the result and to make it more flexible, in dashboard, I want to add input textbox where we can search via field values in application so for any particular value I can write in search box and run the query. &lt;/P&gt;

&lt;P&gt;e.g.  if my field2 contains abc ; I want to type abc is search box and click submit and all results containing abc of that field will pull out the report. &lt;/P&gt;

&lt;P&gt;Can anyone please help in that. &lt;/P&gt;

&lt;P&gt;Thanks &amp;amp; Regards,&lt;BR /&gt;
Binay Agarwal &lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 03:36:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-lookup-csv-file-to-filter-events/m-p/222269#M65353</guid>
      <dc:creator>bagarwal</dc:creator>
      <dc:date>2017-01-09T03:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Using lookup (.csv file) to  filter events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-lookup-csv-file-to-filter-events/m-p/222270#M65354</link>
      <description>&lt;P&gt;See the example dashboard of the textbox form input on Splunk documentation.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.3.0/Viz/PanelreferenceforSimplifiedXML#input_type_.22text.22"&gt;http://docs.splunk.com/Documentation/Splunk/6.3.0/Viz/PanelreferenceforSimplifiedXML#input_type_.22text.22&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Also, would suggest to download and install "S&lt;A href="https://splunkbase.splunk.com/app/1603/"&gt;plunk 6.x Dashboard Example&lt;/A&gt;" app which has this and many other sample dashboards.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 04:34:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-lookup-csv-file-to-filter-events/m-p/222270#M65354</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-01-09T04:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: Using lookup (.csv file) to  filter events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-lookup-csv-file-to-filter-events/m-p/222271#M65355</link>
      <description>&lt;P&gt;Thanks @somesoni2.  It helps &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 07:56:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-lookup-csv-file-to-filter-events/m-p/222271#M65355</guid>
      <dc:creator>bagarwal</dc:creator>
      <dc:date>2017-01-09T07:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using lookup (.csv file) to  filter events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-lookup-csv-file-to-filter-events/m-p/222272#M65356</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;The dashboard is perfectly prepared.  One additional thing required.  Need to add the  field with username,  but the challenge is &lt;STRONG&gt;user field is not available in raw event&lt;/STRONG&gt;.  So any way we can co-relate or pull username matches with the host name and display username in the report.  &lt;/P&gt;

&lt;P&gt;Query looks like this: &lt;/P&gt;

&lt;P&gt;index="index_name"   [ | inputlookup  | table Application | rename Application as App ]  | table host, App &lt;/P&gt;

&lt;P&gt;And want to add one more column username so  query should be | table host, username, App&lt;/P&gt;

&lt;P&gt;Would be  thankful if someone can help on this. &lt;/P&gt;

&lt;P&gt;Thanks &amp;amp; Regards,&lt;BR /&gt;
Binay Agarwal &lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2017 05:30:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-lookup-csv-file-to-filter-events/m-p/222272#M65356</guid>
      <dc:creator>bagarwal</dc:creator>
      <dc:date>2017-01-10T05:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using lookup (.csv file) to  filter events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-lookup-csv-file-to-filter-events/m-p/222273#M65357</link>
      <description>&lt;P&gt;From where you can get the user name when you say you can pull from the host name? Is there a mapping exists which relates host with user?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2017 05:46:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-lookup-csv-file-to-filter-events/m-p/222273#M65357</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-01-10T05:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Using lookup (.csv file) to  filter events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-lookup-csv-file-to-filter-events/m-p/222274#M65358</link>
      <description>&lt;P&gt;Hi @somesoni2,&lt;/P&gt;

&lt;P&gt;I mean if we can pull out from other source if hostname and username are present in say in firewall logs (different index ) or in different search head.  Not sure how that could be . &lt;/P&gt;

&lt;P&gt;and also if there is any way to retrieve username when the details are not present in raw logs at all. &lt;/P&gt;

&lt;P&gt;Thanks inadvance. &lt;/P&gt;

&lt;P&gt;Best Regards,&lt;BR /&gt;
Binay Agarwal &lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2017 07:50:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-lookup-csv-file-to-filter-events/m-p/222274#M65358</guid>
      <dc:creator>bagarwal</dc:creator>
      <dc:date>2017-01-10T07:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Using lookup (.csv file) to  filter events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-lookup-csv-file-to-filter-events/m-p/222275#M65359</link>
      <description>&lt;P&gt;Hi @somesoni2, all,&lt;/P&gt;

&lt;P&gt;Would like to add feature in my lookup file . &lt;BR /&gt;
Now I have 2 columns the .csv file &lt;BR /&gt;
Application  Category_Y&lt;BR /&gt;
Paint                    Y&lt;BR /&gt;
abc*                     Y&lt;BR /&gt;
xyz*&lt;BR /&gt;
aaa*                    Y&lt;/P&gt;

&lt;P&gt;Now I want to write a query that gives the result when Catogory_Y =Y &lt;/P&gt;

&lt;P&gt;Current Query: &lt;BR /&gt;
index="index_name" [ | inputlookup  | table Application | rename Application as App ] | table host, App&lt;/P&gt;

&lt;P&gt;Kindly suggest changes need to be made in the query to match the condition and get the result. &lt;/P&gt;

&lt;P&gt;Thanks in advance &lt;/P&gt;

&lt;P&gt;Best Regards,&lt;BR /&gt;
Binay Agarwal &lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2017 11:27:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-lookup-csv-file-to-filter-events/m-p/222275#M65359</guid>
      <dc:creator>bagarwal</dc:creator>
      <dc:date>2017-01-17T11:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using lookup (.csv file) to  filter events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-lookup-csv-file-to-filter-events/m-p/222276#M65360</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/15147"&gt;@somesoni2&lt;/a&gt;, all,&lt;/P&gt;

&lt;P&gt;Would like to add feature in my lookup file . &lt;BR /&gt;
Now I have 2 columns the .csv file &lt;BR /&gt;
Application, Category_Y&lt;BR /&gt;
Paint, Y&lt;BR /&gt;
abc*, Y&lt;BR /&gt;
xyz*&lt;BR /&gt;
aaa*, Y&lt;/P&gt;

&lt;P&gt;Now I want to write a query that gives the result when Catogory_Y =Y&lt;/P&gt;

&lt;P&gt;Current Query: &lt;BR /&gt;
index="index_name" [ | inputlookup | table Application | rename Application as App ] | table host, App&lt;/P&gt;

&lt;P&gt;Kindly suggest changes need to be made in the query to match the condition and get the result.&lt;/P&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;BR /&gt;
Binay Agarwal&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:27:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-lookup-csv-file-to-filter-events/m-p/222276#M65360</guid>
      <dc:creator>bagarwal</dc:creator>
      <dc:date>2020-09-29T12:27:56Z</dc:date>
    </item>
  </channel>
</rss>

