<?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>question Re: In Nifi Tailing multiple directories with the same filename in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/In-Nifi-Tailing-multiple-directories-with-the-same-filename/m-p/218655#M69492</link>
    <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/15261/elloyd.html" nodeid="15261" target="_blank"&gt;@Eric Lloyd&lt;/A&gt;, can you once try to configure processor as &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="40797-tailtofile.png" style="width: 701px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/16054iAEA08A43F15C454F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="40797-tailtofile.png" alt="40797-tailtofile.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;what i have tried is:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;i have created 2 directories in my &lt;/P&gt;&lt;PRE&gt;/tmp&lt;/PRE&gt;&lt;P&gt;as &lt;STRONG&gt;test1 and test2 &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and did&lt;/P&gt;&lt;PRE&gt;echo "test"&amp;gt;/tmp/test1/test.log
echo "test"&amp;gt;/tmp/test2/test.log&lt;/PRE&gt;&lt;P&gt;and in the processor i configured Files to tail property as &lt;/P&gt;&lt;PRE&gt;test[1-2]/test.log&lt;/PRE&gt;&lt;P&gt;it will look for both &lt;STRONG&gt;test1 and test2&lt;/STRONG&gt; directories &lt;/P&gt;&lt;P&gt;Rolling filename strategy(not required) as test.log as my file names are always test.log&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Base directory is /tmp&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;i mentioned as Fixed name as Rolling strategy and Recursive lookup true&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="40798-taillogfile.png" style="width: 472px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/16055i1C4244C9A61FFA09/image-size/medium?v=v2&amp;amp;px=400" role="button" title="40798-taillogfile.png" alt="40798-taillogfile.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As this processor picks up new data and stores the state for each directories.&lt;/P&gt;</description>
    <pubDate>Sun, 18 Aug 2019 02:47:58 GMT</pubDate>
    <dc:creator>Shu_ashu</dc:creator>
    <dc:date>2019-08-18T02:47:58Z</dc:date>
    <item>
      <title>In Nifi Tailing multiple directories with the same filename</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/In-Nifi-Tailing-multiple-directories-with-the-same-filename/m-p/218654#M69491</link>
      <description>&lt;P&gt;I am attempting to use TailFile processor to retrieve files from multiple directories with the filename having the same name.&lt;/P&gt;&lt;P&gt;For example: &lt;/P&gt;&lt;P&gt;/var/foo/test1/test.log&lt;/P&gt;&lt;P&gt;/var/foo/test2/test.log&lt;/P&gt;&lt;P&gt;I want to get both of the test.log files.&lt;/P&gt;&lt;P&gt;I have tried using Multiple File mode with /var/foo/*/test.log but that seems to return an error.  Is there a way to do this?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 06:09:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/In-Nifi-Tailing-multiple-directories-with-the-same-filename/m-p/218654#M69491</guid>
      <dc:creator>elloyd</dc:creator>
      <dc:date>2017-10-12T06:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: In Nifi Tailing multiple directories with the same filename</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/In-Nifi-Tailing-multiple-directories-with-the-same-filename/m-p/218655#M69492</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/15261/elloyd.html" nodeid="15261" target="_blank"&gt;@Eric Lloyd&lt;/A&gt;, can you once try to configure processor as &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="40797-tailtofile.png" style="width: 701px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/16054iAEA08A43F15C454F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="40797-tailtofile.png" alt="40797-tailtofile.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;what i have tried is:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;i have created 2 directories in my &lt;/P&gt;&lt;PRE&gt;/tmp&lt;/PRE&gt;&lt;P&gt;as &lt;STRONG&gt;test1 and test2 &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and did&lt;/P&gt;&lt;PRE&gt;echo "test"&amp;gt;/tmp/test1/test.log
echo "test"&amp;gt;/tmp/test2/test.log&lt;/PRE&gt;&lt;P&gt;and in the processor i configured Files to tail property as &lt;/P&gt;&lt;PRE&gt;test[1-2]/test.log&lt;/PRE&gt;&lt;P&gt;it will look for both &lt;STRONG&gt;test1 and test2&lt;/STRONG&gt; directories &lt;/P&gt;&lt;P&gt;Rolling filename strategy(not required) as test.log as my file names are always test.log&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Base directory is /tmp&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;i mentioned as Fixed name as Rolling strategy and Recursive lookup true&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="40798-taillogfile.png" style="width: 472px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/16055i1C4244C9A61FFA09/image-size/medium?v=v2&amp;amp;px=400" role="button" title="40798-taillogfile.png" alt="40798-taillogfile.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As this processor picks up new data and stores the state for each directories.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 02:47:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/In-Nifi-Tailing-multiple-directories-with-the-same-filename/m-p/218655#M69492</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-08-18T02:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: In Nifi Tailing multiple directories with the same filename</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/In-Nifi-Tailing-multiple-directories-with-the-same-filename/m-p/218656#M69493</link>
      <description>&lt;P&gt;Thanks for the answer but maybe I should have clarified.  This solution works for my testing environment but my final environment is actually monitoring the versions directory... so it won't always be test1 and test1 but rather&lt;/P&gt;&lt;P&gt;../versions/123.1&lt;/P&gt;&lt;P&gt;.../versions/234.2&lt;/P&gt;&lt;P&gt;and then a new version will be added that is an unknown number.  So that is why I was hoping to use a wildcard like:  *&lt;/P&gt;&lt;P&gt;Can I use a wildcard?  It seems you are using an expression language, maybe with /versions/[*]&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 23:50:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/In-Nifi-Tailing-multiple-directories-with-the-same-filename/m-p/218656#M69493</guid>
      <dc:creator>elloyd</dc:creator>
      <dc:date>2017-10-12T23:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: In Nifi Tailing multiple directories with the same filename</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/In-Nifi-Tailing-multiple-directories-with-the-same-filename/m-p/218657#M69494</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/15261/elloyd.html" nodeid="15261" target="_blank"&gt;@Eric Lloyd&lt;/A&gt;, for this case make we cannot mention wild cards like [*] as this processor &lt;STRONG&gt;wont&lt;/STRONG&gt; &lt;STRONG&gt;accepting those regex&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;change &lt;STRONG&gt;FilestoTail&lt;/STRONG&gt; property to&lt;/P&gt;&lt;PRE&gt;test[1-2]/[\d|a-z.*]{1,}/test.log&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Expression Explanation:-&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;test[1-2] --look for &lt;STRONG&gt; test1 or test2&lt;/STRONG&gt; &lt;/PRE&gt;&lt;P&gt;Then property expression check for &lt;/P&gt;&lt;PRE&gt;[\d|a-z.*]{1,} --check for directory name as having digits or letters more than one time &lt;/PRE&gt;&lt;P&gt;and &lt;STRONG&gt;lists all&lt;/STRONG&gt; those &lt;STRONG&gt;directories recursively.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Configs:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="40820-tailtofile.png" style="width: 702px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/16053i40397BCFEA2C4E55/image-size/medium?v=v2&amp;amp;px=400" role="button" title="40820-tailtofile.png" alt="40820-tailtofile.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;For your case:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Files toTail property should be some thing like below&lt;/P&gt;&lt;PRE&gt;&lt;B&gt;versions&lt;/B&gt;/[\d|a-z.*]{1,}/&amp;lt;your-log-file-name&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 18 Aug 2019 02:47:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/In-Nifi-Tailing-multiple-directories-with-the-same-filename/m-p/218657#M69494</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-08-18T02:47:44Z</dc:date>
    </item>
  </channel>
</rss>

