<?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: Monitoring File Presence Dynamically? (Log files with dates) in Log Analytics</title>
    <link>https://community.dynatrace.com/t5/Log-Analytics/Monitoring-File-Presence-Dynamically-Log-files-with-dates/m-p/258651#M63</link>
    <description>&lt;P&gt;Deploying an OpenTelemetry collector (such as &lt;A href="https://docs.dynatrace.com/docs/extend-dynatrace/opentelemetry/collector" target="_blank"&gt;the supported Dynatrace collecto&lt;/A&gt;r) and using the &lt;A href="https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/filelogreceiver/README.md" target="_blank"&gt;filelogreceiver&lt;/A&gt;&amp;nbsp;will achieve this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN class="pl-ent"&gt;receivers&lt;/SPAN&gt;:
  &lt;SPAN class="pl-ent"&gt;filelog&lt;/SPAN&gt;:
    &lt;SPAN class="pl-ent"&gt;include&lt;/SPAN&gt;: &lt;SPAN class="pl-s"&gt;[ c:\path\to\logs\*.log ]&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Oct 2024 03:24:37 GMT</pubDate>
    <dc:creator>adam_gardner</dc:creator>
    <dc:date>2024-10-09T03:24:37Z</dc:date>
    <item>
      <title>Monitoring File Presence Dynamically? (Log files with dates)</title>
      <link>https://community.dynatrace.com/t5/Log-Analytics/Monitoring-File-Presence-Dynamically-Log-files-with-dates/m-p/255681#M60</link>
      <description>&lt;P&gt;Hello community, I could use your advice with something.&lt;/P&gt;
&lt;P&gt;I'm trying to monitor the presence of a file on a given directory. The easiest and most simple solution would be to use the Filesystem Extension, which allows me to use a count to do just that.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PedroSantos_0-1726233006512.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/22360i70293EED33ECC7E3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PedroSantos_0-1726233006512.png" alt="PedroSantos_0-1726233006512.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The limiting factor is that the only available configurations for count are the following:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PedroSantos_1-1726233057992.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/22361i865CBD39148D51EE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PedroSantos_1-1726233057992.png" alt="PedroSantos_1-1726233057992.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My problem:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The name of the log file I need to check for changes daily, &lt;/STRONG&gt;&lt;U&gt;because the date is appended to the daily created file.&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;So today I would need to look for 13092024_logfile.log&lt;/P&gt;
&lt;P&gt;But tomorrow I'll have to check if 14092024_logfile.log is present, on the same directory. And yesterday's log file will be there too, so I can't do a simple count of files.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Given how common it is to append dates to log file names, I figured someone here must've dealt with this problem before.&lt;/P&gt;
&lt;P&gt;Any insight, advice or counsel on how to deal with this situation would be greatly appreciated &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2024 07:24:21 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Log-Analytics/Monitoring-File-Presence-Dynamically-Log-files-with-dates/m-p/255681#M60</guid>
      <dc:creator>PedroSantos</dc:creator>
      <dc:date>2024-10-15T07:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: Monitoring File Presence Dynamically? (Log files with dates)</title>
      <link>https://community.dynatrace.com/t5/Log-Analytics/Monitoring-File-Presence-Dynamically-Log-files-with-dates/m-p/256496#M61</link>
      <description>&lt;P&gt;Double post, just in case someone bumps into the same issue I did. I found a solution on the same menu:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PedroSantos_0-1726756991250.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/22674i3B10B94F6576EF8A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PedroSantos_0-1726756991250.png" alt="PedroSantos_0-1726756991250.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;It wasn't immediately obvious for me, so I thought I'd share the solution anyway.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2024 14:43:43 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Log-Analytics/Monitoring-File-Presence-Dynamically-Log-files-with-dates/m-p/256496#M61</guid>
      <dc:creator>PedroSantos</dc:creator>
      <dc:date>2024-09-19T14:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: Monitoring File Presence Dynamically? (Log files with dates)</title>
      <link>https://community.dynatrace.com/t5/Log-Analytics/Monitoring-File-Presence-Dynamically-Log-files-with-dates/m-p/256753#M62</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If existing extensions are not matching your use case, you can always create your own script for checking file exist or not.&lt;/P&gt;&lt;P&gt;For example, script output can ingest "1" if exist; and "0" if not, using &lt;A title="metric scripting integration" href="https://docs.dynatrace.com/docs/shortlink/pipe-metric-ingestion" target="_blank" rel="noopener"&gt;metric scripting integration&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Sun, 22 Sep 2024 10:38:22 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Log-Analytics/Monitoring-File-Presence-Dynamically-Log-files-with-dates/m-p/256753#M62</guid>
      <dc:creator>AntonPineiro</dc:creator>
      <dc:date>2024-09-22T10:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: Monitoring File Presence Dynamically? (Log files with dates)</title>
      <link>https://community.dynatrace.com/t5/Log-Analytics/Monitoring-File-Presence-Dynamically-Log-files-with-dates/m-p/258651#M63</link>
      <description>&lt;P&gt;Deploying an OpenTelemetry collector (such as &lt;A href="https://docs.dynatrace.com/docs/extend-dynatrace/opentelemetry/collector" target="_blank"&gt;the supported Dynatrace collecto&lt;/A&gt;r) and using the &lt;A href="https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/filelogreceiver/README.md" target="_blank"&gt;filelogreceiver&lt;/A&gt;&amp;nbsp;will achieve this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN class="pl-ent"&gt;receivers&lt;/SPAN&gt;:
  &lt;SPAN class="pl-ent"&gt;filelog&lt;/SPAN&gt;:
    &lt;SPAN class="pl-ent"&gt;include&lt;/SPAN&gt;: &lt;SPAN class="pl-s"&gt;[ c:\path\to\logs\*.log ]&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 03:24:37 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Log-Analytics/Monitoring-File-Presence-Dynamically-Log-files-with-dates/m-p/258651#M63</guid>
      <dc:creator>adam_gardner</dc:creator>
      <dc:date>2024-10-09T03:24:37Z</dc:date>
    </item>
  </channel>
</rss>

