<?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: Capturing logs using regex in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Capturing-logs-using-regex/m-p/85020#M17693</link>
    <description>&lt;P&gt;Thanks for suggestion. I should have think this before. I tried the above changes in prop.conf but its not working. &lt;BR /&gt;
1) I am looking log files from windows machine so I changed the forward slash to backward. &lt;/P&gt;

&lt;P&gt;[source::...\XManager\...\GenericService.log]&lt;BR /&gt;
sourcetype=XManager&lt;/P&gt;

&lt;P&gt;Exact location: &lt;BR /&gt;
D:\SystemX\XManager\TEST1_XM_5_1_0_366\Director\GenericService\Logs\SystemX\GenericService.log   &lt;/P&gt;

&lt;P&gt;I just  have to make the changes under deployment server not on the indexer right? &lt;/P&gt;

&lt;P&gt;Please let me correct if I am wrong. &lt;BR /&gt;
thanks, Nik&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 12:00:02 GMT</pubDate>
    <dc:creator>nikhilagrawal</dc:creator>
    <dc:date>2020-09-28T12:00:02Z</dc:date>
    <item>
      <title>Capturing logs using regex</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Capturing-logs-using-regex/m-p/85018#M17691</link>
      <description>&lt;P&gt;Hi,I've below log lines in below &lt;BR /&gt;
format:&lt;/P&gt;

&lt;P&gt;1) &lt;CODE&gt;D:\SystemX\XManager\TEST1_XM_5_1_0_361\Director\GenericService.log&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;2) &lt;CODE&gt;D:\SystemX\XTrader\TEST1_XM_5_1_0_361\Director\GenericService.log&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;3) &lt;CODE&gt;D:\SystemX\XInterface\TEST1_XM_5_1_0_361\Director\GenericService.log&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;How can I get the logs under &lt;CODE&gt;D:\SystemX\......&lt;/CODE&gt; I have created field extract filter to seperate XManager, XTrader and Xinterface and I want to view logs in a way that if I select XManager I will see all logs under &lt;CODE&gt;D:\SystemX\XManager\..&lt;/CODE&gt; and so on. &lt;BR /&gt;
The regex i was trying : &lt;CODE&gt;^\w+\:\\SystemX\\(?&amp;lt;app&amp;gt;[A-Za-z]*)&lt;/CODE&gt;&lt;BR /&gt;
But it showing error. &lt;/P&gt;

&lt;P&gt;I really appreciate your help. &lt;BR /&gt;
Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2012 09:23:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Capturing-logs-using-regex/m-p/85018#M17691</guid>
      <dc:creator>nikhilagrawal</dc:creator>
      <dc:date>2012-06-27T09:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: Capturing logs using regex</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Capturing-logs-using-regex/m-p/85019#M17692</link>
      <description>&lt;P&gt;Nik,&lt;/P&gt;

&lt;P&gt;I'm curious why you're not just sourcetyping these...ie:&lt;/P&gt;

&lt;P&gt;In &lt;STRONG&gt;props.conf&lt;/STRONG&gt;.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::.../XManager/.../GenericService.log]
sourcetype = XManager

[source::.../XTrader/.../GenericService.log]
sourcetype = XTrader

[source::.../XInterface/.../GenericService.log]
sourcetype = XInterface
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That way, when you search on them you just type:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype = XManager &amp;lt;rest of your search&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You will get all of the files (regardless of which version they are) that have XManager in the directory structure and end with the filename of GenericService.log.&lt;/P&gt;

&lt;P&gt;Hope that helps.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2012 14:08:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Capturing-logs-using-regex/m-p/85019#M17692</guid>
      <dc:creator>Lamar</dc:creator>
      <dc:date>2012-06-27T14:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: Capturing logs using regex</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Capturing-logs-using-regex/m-p/85020#M17693</link>
      <description>&lt;P&gt;Thanks for suggestion. I should have think this before. I tried the above changes in prop.conf but its not working. &lt;BR /&gt;
1) I am looking log files from windows machine so I changed the forward slash to backward. &lt;/P&gt;

&lt;P&gt;[source::...\XManager\...\GenericService.log]&lt;BR /&gt;
sourcetype=XManager&lt;/P&gt;

&lt;P&gt;Exact location: &lt;BR /&gt;
D:\SystemX\XManager\TEST1_XM_5_1_0_366\Director\GenericService\Logs\SystemX\GenericService.log   &lt;/P&gt;

&lt;P&gt;I just  have to make the changes under deployment server not on the indexer right? &lt;/P&gt;

&lt;P&gt;Please let me correct if I am wrong. &lt;BR /&gt;
thanks, Nik&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:00:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Capturing-logs-using-regex/m-p/85020#M17693</guid>
      <dc:creator>nikhilagrawal</dc:creator>
      <dc:date>2020-09-28T12:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Capturing logs using regex</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Capturing-logs-using-regex/m-p/85021#M17694</link>
      <description>&lt;P&gt;Try switching from slashes to backslashes.   Remember the backslashes need to be escaped, i.e. &lt;CODE&gt;\\&lt;/CODE&gt;.  (Or, setup a rule that allow for both unix and windows separators using something like this:  &lt;CODE&gt;[source::...[/\\]XInterface[/\\]...[/\\]GenericService.log]&lt;/CODE&gt;.   It looks funny, but it should work.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2012 19:50:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Capturing-logs-using-regex/m-p/85021#M17694</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2012-06-27T19:50:22Z</dc:date>
    </item>
  </channel>
</rss>

