<?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: Searching dynamic field in splunk in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-dynamic-field-in-Splunk/m-p/634881#M220563</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/158927"&gt;@sbhatnagar88&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I don't thing that's possible to have what you would, I think that you should think to a different structure for your lookup, e.g.:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;host,&lt;/LI&gt;&lt;LI&gt;day,&lt;/LI&gt;&lt;LI&gt;value,&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;then you could run something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup test 
| search host="ABC"  
| search day=strftime(now(),"%A") AND value=1&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Fri, 17 Mar 2023 08:46:36 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2023-03-17T08:46:36Z</dc:date>
    <item>
      <title>How to search dynamic field in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-dynamic-field-in-Splunk/m-p/634875#M220559</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have a lookup table where column names are with weekdays (like monday, tuesday, wednesday,...) and have possible values as 1 and 0 only.&lt;/P&gt;
&lt;P&gt;What I want to achieve..&lt;/P&gt;
&lt;P&gt;...some query | eval day=strftime(now(),"%A") | where 'day'=1&lt;/P&gt;
&lt;P&gt;but this doesn't seems to be working. Any idea how to search dynamic fields.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 16:10:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-dynamic-field-in-Splunk/m-p/634875#M220559</guid>
      <dc:creator>sbhatnagar88</dc:creator>
      <dc:date>2023-03-17T16:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: Searching dynamic field in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-dynamic-field-in-Splunk/m-p/634876#M220560</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/158927"&gt;@sbhatnagar88&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;which are the lookup fields?&lt;/P&gt;&lt;P&gt;if they are:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;day&amp;nbsp;&lt;SPAN&gt;(like monday, tuesday, wednesday,...)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;value (0 or 1)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;your search must be different:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;...some query 
| eval day=strftime(now(),"%A") 
| search [ | inputlookup your_lookup.csv WHERE value="1" | fields day ]
| ...&lt;/LI-CODE&gt;&lt;P&gt;put attention that the "day" values from the main search and from the lookup are the same.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 08:16:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-dynamic-field-in-Splunk/m-p/634876#M220560</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-03-17T08:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Searching dynamic field in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-dynamic-field-in-Splunk/m-p/634877#M220561</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;My search itself begins with searching from KV lookup.&amp;nbsp; and that kv lookup have column name with day name something like&lt;/P&gt;&lt;P&gt;host&amp;nbsp; &amp;nbsp; Type&amp;nbsp; monday&amp;nbsp; tuesday&amp;nbsp; wednesday&amp;nbsp; thursday&amp;nbsp; &amp;nbsp;friday&amp;nbsp; &amp;nbsp;saturday&amp;nbsp; sunday&lt;/P&gt;&lt;P&gt;ABC&amp;nbsp; &amp;nbsp; &amp;nbsp; X&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/P&gt;&lt;P&gt;DEF&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Y&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;&lt;P&gt;I am using below query..&lt;/P&gt;&lt;P&gt;| inputlookup test | search type="ABC"&amp;nbsp; | eval&amp;nbsp;day=strftime(now(),"%A")&amp;nbsp; &amp;nbsp;| where 'day'=1&lt;/P&gt;&lt;P&gt;Basically I want to search dynamic day from my lookup.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 08:25:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-dynamic-field-in-Splunk/m-p/634877#M220561</guid>
      <dc:creator>sbhatnagar88</dc:creator>
      <dc:date>2023-03-17T08:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: Searching dynamic field in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-dynamic-field-in-Splunk/m-p/634881#M220563</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/158927"&gt;@sbhatnagar88&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I don't thing that's possible to have what you would, I think that you should think to a different structure for your lookup, e.g.:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;host,&lt;/LI&gt;&lt;LI&gt;day,&lt;/LI&gt;&lt;LI&gt;value,&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;then you could run something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup test 
| search host="ABC"  
| search day=strftime(now(),"%A") AND value=1&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 08:46:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-dynamic-field-in-Splunk/m-p/634881#M220563</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-03-17T08:46:36Z</dc:date>
    </item>
  </channel>
</rss>

