<?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 search for sources with a timestamp pattern in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-sources-with-a-timestamp-pattern/m-p/280000#M53596</link>
    <description>&lt;P&gt;Thanks.  Not working...&lt;/P&gt;

&lt;P&gt;Here is a sample sources:&lt;/P&gt;

&lt;P&gt;ORS_MMK_Node2_PR.20160409_224023_783.log &lt;BR /&gt;
ORS_RTP_Node1_PR.20160409_221411_433.log &lt;BR /&gt;
ORS_OMA_Node3_PR.20160409_214537_963.log&lt;BR /&gt;&lt;BR /&gt;
ORS_MMK_Node1_PR.20160409_212722_403.log    &lt;/P&gt;

&lt;P&gt;Here's my search:&lt;/P&gt;

&lt;P&gt;index=main sourcetype=check_log_permissions RESOURCE_TYPE=file (RESOURCE!="du" AND RESOURCE!="cd") |fields RESOURCE |table RESOURCE | eval file_date=strftime(now(), "%Y%m%d_&lt;EM&gt;_&lt;/EM&gt;")  |eval mySource="ORS_&lt;EM&gt;_Node&lt;/EM&gt;_PR." + file_date + ".log" |where match(RESOURCE,mySource)&lt;/P&gt;

&lt;P&gt;Comes back with nothing.  If I remove the where clause, it comes back with a bunch.  I'd like to be able to search across all the source examples, using wildcards, rather than hard-coding anything. &lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 09:23:00 GMT</pubDate>
    <dc:creator>a212830</dc:creator>
    <dc:date>2020-09-29T09:23:00Z</dc:date>
    <item>
      <title>How to search for sources with a timestamp pattern</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-sources-with-a-timestamp-pattern/m-p/279996#M53592</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I want to search for a set of files that end in YYYYMMDD_HHMMSS_PID.log format and I want to search on files that match today's date.  How would I do that?  &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:20:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-sources-with-a-timestamp-pattern/m-p/279996#M53592</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2020-09-29T09:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for sources with a timestamp pattern</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-sources-with-a-timestamp-pattern/m-p/279997#M53593</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;other parts of base search&amp;gt;  [|noop|stats count AS source|eval source=strftime(now(), "*%Y%m%d_*_*")]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 10 Apr 2016 01:18:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-sources-with-a-timestamp-pattern/m-p/279997#M53593</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-04-10T01:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for sources with a timestamp pattern</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-sources-with-a-timestamp-pattern/m-p/279998#M53594</link>
      <description>&lt;P&gt;Thanks.  PID is actually a number, which can vary in length.   How would I grab that as well?&lt;/P&gt;</description>
      <pubDate>Sun, 10 Apr 2016 01:42:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-sources-with-a-timestamp-pattern/m-p/279998#M53594</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2016-04-10T01:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for sources with a timestamp pattern</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-sources-with-a-timestamp-pattern/m-p/279999#M53595</link>
      <description>&lt;P&gt;Answer updated.&lt;/P&gt;</description>
      <pubDate>Sun, 10 Apr 2016 02:05:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-sources-with-a-timestamp-pattern/m-p/279999#M53595</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-04-10T02:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for sources with a timestamp pattern</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-sources-with-a-timestamp-pattern/m-p/280000#M53596</link>
      <description>&lt;P&gt;Thanks.  Not working...&lt;/P&gt;

&lt;P&gt;Here is a sample sources:&lt;/P&gt;

&lt;P&gt;ORS_MMK_Node2_PR.20160409_224023_783.log &lt;BR /&gt;
ORS_RTP_Node1_PR.20160409_221411_433.log &lt;BR /&gt;
ORS_OMA_Node3_PR.20160409_214537_963.log&lt;BR /&gt;&lt;BR /&gt;
ORS_MMK_Node1_PR.20160409_212722_403.log    &lt;/P&gt;

&lt;P&gt;Here's my search:&lt;/P&gt;

&lt;P&gt;index=main sourcetype=check_log_permissions RESOURCE_TYPE=file (RESOURCE!="du" AND RESOURCE!="cd") |fields RESOURCE |table RESOURCE | eval file_date=strftime(now(), "%Y%m%d_&lt;EM&gt;_&lt;/EM&gt;")  |eval mySource="ORS_&lt;EM&gt;_Node&lt;/EM&gt;_PR." + file_date + ".log" |where match(RESOURCE,mySource)&lt;/P&gt;

&lt;P&gt;Comes back with nothing.  If I remove the where clause, it comes back with a bunch.  I'd like to be able to search across all the source examples, using wildcards, rather than hard-coding anything. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:23:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-sources-with-a-timestamp-pattern/m-p/280000#M53596</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2020-09-29T09:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for sources with a timestamp pattern</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-sources-with-a-timestamp-pattern/m-p/280001#M53597</link>
      <description>&lt;P&gt;You didn't tell me that the field in question is &lt;CODE&gt;RESOURCE&lt;/CODE&gt;.  This is why you should ALWAYS post your search strings.  I naturally assumed that you were using field &lt;CODE&gt;source&lt;/CODE&gt;.  Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main sourcetype=check_log_permissions RESOURCE_TYPE=file (RESOURCE!="du" AND RESOURCE!="cd") [|noop|stats count AS RESOURCE|eval RESOURCE=strftime(now(), "*%Y%m%d_*_*")]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 10 Apr 2016 04:22:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-sources-with-a-timestamp-pattern/m-p/280001#M53597</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-04-10T04:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for sources with a timestamp pattern</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-sources-with-a-timestamp-pattern/m-p/280002#M53598</link>
      <description>&lt;P&gt;Use a regex tool to define/mature your pattern - &lt;A href="https://regex101.com/"&gt;https://regex101.com/&lt;/A&gt; is great!&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2016 19:45:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-sources-with-a-timestamp-pattern/m-p/280002#M53598</guid>
      <dc:creator>sloshburch</dc:creator>
      <dc:date>2016-06-13T19:45:14Z</dc:date>
    </item>
  </channel>
</rss>

