<?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 How to search directory with 80k plus log files with unique names? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-search-directory-with-80k-plus-log-files-with-unique/m-p/653999#M110885</link>
    <description>&lt;P&gt;Hello Community,&lt;/P&gt;
&lt;P&gt;I have tried searching, but I've not find an answer to my specifics needs... Or I dont know how to word my question.&lt;/P&gt;
&lt;P&gt;I work in a company that manufactures servers. Each server manufactured creates a logfile with a unique name. The log file is a txt file that has identifying lines like "Serial Number: FMXXXXXXX", "Station: 1", "Start Tme: 12:00:00", etc.&lt;/P&gt;
&lt;P&gt;I am trying to configure splunk to search all these log files based on serial number (to start with) and eventually create a searchable dashboard where I can lookup log files based on serial numbers.&lt;/P&gt;
&lt;P&gt;I'm obviously new to splunk, and have watched a lot of tutuorials, but most tutorials focus an searching one big log file, or several log files.&lt;/P&gt;
&lt;P&gt;so far, i have setup the splunk UI and pointed it to a directory containing my log files.&amp;nbsp; Under "data summary" my sources are over 100k and sourcetypes are over 14k.&lt;/P&gt;
&lt;P&gt;any hep would be appreciated.&lt;/P&gt;
&lt;P&gt;Kevin&lt;/P&gt;</description>
    <pubDate>Mon, 14 Aug 2023 17:06:45 GMT</pubDate>
    <dc:creator>mrkevinhoang</dc:creator>
    <dc:date>2023-08-14T17:06:45Z</dc:date>
    <item>
      <title>How to search directory with 80k plus log files with unique names?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-search-directory-with-80k-plus-log-files-with-unique/m-p/653999#M110885</link>
      <description>&lt;P&gt;Hello Community,&lt;/P&gt;
&lt;P&gt;I have tried searching, but I've not find an answer to my specifics needs... Or I dont know how to word my question.&lt;/P&gt;
&lt;P&gt;I work in a company that manufactures servers. Each server manufactured creates a logfile with a unique name. The log file is a txt file that has identifying lines like "Serial Number: FMXXXXXXX", "Station: 1", "Start Tme: 12:00:00", etc.&lt;/P&gt;
&lt;P&gt;I am trying to configure splunk to search all these log files based on serial number (to start with) and eventually create a searchable dashboard where I can lookup log files based on serial numbers.&lt;/P&gt;
&lt;P&gt;I'm obviously new to splunk, and have watched a lot of tutuorials, but most tutorials focus an searching one big log file, or several log files.&lt;/P&gt;
&lt;P&gt;so far, i have setup the splunk UI and pointed it to a directory containing my log files.&amp;nbsp; Under "data summary" my sources are over 100k and sourcetypes are over 14k.&lt;/P&gt;
&lt;P&gt;any hep would be appreciated.&lt;/P&gt;
&lt;P&gt;Kevin&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2023 17:06:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-search-directory-with-80k-plus-log-files-with-unique/m-p/653999#M110885</guid>
      <dc:creator>mrkevinhoang</dc:creator>
      <dc:date>2023-08-14T17:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: seraching directory with 80k plus log files with unique names</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-search-directory-with-80k-plus-log-files-with-unique/m-p/654004#M110886</link>
      <description>&lt;P&gt;If you have ingested those log files into Splunk, I assume you have directed them to a specific index, so all the log files will be in a single index.&lt;/P&gt;&lt;P&gt;You mention different sourcetypes - how do you get different sourcetypes?&lt;/P&gt;&lt;P&gt;As far as searching in Splunk, you simply start with an SPL statement, e.g.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=&amp;lt;your_index_with_the_data&amp;gt; OTHER_SEARCH_CRITERIA&lt;/LI-CODE&gt;&lt;P&gt;Splunk will often 'extract' fields from your data automatically where it can, but if it can't, you can set up field extractions - in the left bar of your search window, you will see 'Extract new fields', you can either extract fields through this UI or you can use the rex command&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.0.3/SearchReference/Rex" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/9.0.3/SearchReference/Rex&lt;/A&gt;&amp;nbsp;to extract fields based on a regular expression, for example this statement&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "Serial Number: (?&amp;lt;serial_number&amp;gt;[^\"]*)\", \"Station: (?&amp;lt;station&amp;gt;\d+)"&lt;/LI-CODE&gt;&lt;P&gt;will extract serial number and station from your event based on your example.&lt;/P&gt;&lt;P&gt;Come back with further questions as you make progress.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bowesmana_0-1691724312729.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/26754i0D68B73DDE7E1A65/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bowesmana_0-1691724312729.png" alt="bowesmana_0-1691724312729.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 03:29:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-search-directory-with-80k-plus-log-files-with-unique/m-p/654004#M110886</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-08-11T03:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: seraching directory with 80k plus log files with unique names</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-search-directory-with-80k-plus-log-files-with-unique/m-p/654040#M110894</link>
      <description>&lt;P&gt;Thanks for the quick reply!&lt;/P&gt;&lt;P&gt;I have imported the data, but im not sure if I have "directed to an index". I looked at settings&amp;gt;indexes, I see about 13. 1 named MAIN has about 29G of data, so i assume this is the Index you are referring to?&lt;/P&gt;&lt;P&gt;as for the sourcetypes, I dont know where they come from.&lt;BR /&gt;Hosts (1)&amp;nbsp;&amp;nbsp;&amp;nbsp; |.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sources (100,000).&amp;nbsp;&amp;nbsp;&amp;nbsp; |.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sourcetypes (14,506)&lt;/P&gt;&lt;P&gt;Seems like it's auto generated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 09:27:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-search-directory-with-80k-plus-log-files-with-unique/m-p/654040#M110894</guid>
      <dc:creator>mrkevinhoang</dc:creator>
      <dc:date>2023-08-11T09:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: seraching directory with 80k plus log files with unique names</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-search-directory-with-80k-plus-log-files-with-unique/m-p/654207#M110914</link>
      <description>&lt;P&gt;You can get an idea of what's ingested by running this search over the last 7 days&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats dc(sourcetype) as sourcetypes count latest(_time) as lastItem where index=* by index
| eval lastItem=strftime(lastItem, "%F %T")&lt;/LI-CODE&gt;&lt;P&gt;that will tell you what's been ingested for each index over the last 7 days&lt;/P&gt;&lt;P&gt;Assuming it is index=main that has your data, then a simple sear&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=main&lt;/LI-CODE&gt;&lt;P&gt;will return you some events. source will generally be the name of the file that's ingested - not sure what your sourcetypes will be - are these files you're ingesting CSV?&lt;/P&gt;&lt;P&gt;Anyway, find the data and then you can search.&lt;/P&gt;&lt;P&gt;Generally it's a good idea to plan where you want your data to go and what sourcetype you want it to become, as sourcetype is a key way to define behaviour for that data.&lt;/P&gt;&lt;P&gt;In your case, if you just have the data there now, you can either plan it, start again and have another go, or probably given your early understanding of Splunk, I would play with the data you have to see if you can start to get some responses from it - then you'll rapidly get a better feel for what you have/can do.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Aug 2023 23:36:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-search-directory-with-80k-plus-log-files-with-unique/m-p/654207#M110914</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-08-13T23:36:17Z</dc:date>
    </item>
  </channel>
</rss>

