<?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 setup a query to search and find file names with the current time value? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-query-to-search-and-find-file-names-with-the/m-p/446771#M126711</link>
    <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main sourcetype=files [ |makeresults | eval filename = "email/outlook/" . strftime(now(), "%Y/%m/%d") . "/*" | format ]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 15 Mar 2019 18:04:09 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2019-03-15T18:04:09Z</dc:date>
    <item>
      <title>How to setup a query to search and find file names with the current time value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-query-to-search-and-find-file-names-with-the/m-p/446770#M126710</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a query that searches a field i.e. filenames with a value in this format &amp;gt;&amp;gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;filename = folder_name/sub_folder_name/date/data   
for example 
filename=email/outlook/2019/03/25/outlook-2019-03-15-12:05:00:987Z
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am looking to create an alert when the folder is not populated with data, and I want to use a now() or other time variable in the file name.&lt;BR /&gt;&lt;BR /&gt;
for example &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main sourcetype=files filename=email/outlook/{time variable}/*   
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So if today is 3/15/2019  the current date variable would be 2019/03/15, and tomorrow the query would use 2019/03/16 as the variable...&lt;/P&gt;

&lt;P&gt;I hope that makes sense.  I basically want to search a field using a current date variable...&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 17:46:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-query-to-search-and-find-file-names-with-the/m-p/446770#M126710</guid>
      <dc:creator>Log_wrangler</dc:creator>
      <dc:date>2019-03-15T17:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup a query to search and find file names with the current time value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-query-to-search-and-find-file-names-with-the/m-p/446771#M126711</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main sourcetype=files [ |makeresults | eval filename = "email/outlook/" . strftime(now(), "%Y/%m/%d") . "/*" | format ]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Mar 2019 18:04:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-query-to-search-and-find-file-names-with-the/m-p/446771#M126711</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-03-15T18:04:09Z</dc:date>
    </item>
  </channel>
</rss>

