<?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 SplunkForwarder inputs.conf - pick one log file if exists, else pick another in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/SplunkForwarder-inputs-conf-pick-one-log-file-if-exists-else/m-p/57532#M11239</link>
    <description>&lt;P&gt;Is there a way to configure SplunkForwarder inputs.conf to do the following?&lt;/P&gt;

&lt;P&gt;The goal is to monitor a few directories and tail "default_log_name" application logs but if a "splunk_preferred_log" file exist, then just tail those ones instead, do not pickup the default log files &lt;/P&gt;

&lt;P&gt;Example:&lt;/P&gt;

&lt;P&gt;A. If only /apps/app_name/logs/DefaultAppLog_Date.log exists = monitor that one&lt;/P&gt;

&lt;P&gt;B. If both /apps/app_name/logs/DefaultAppLog_Date.log and&lt;BR /&gt;
           /apps/app_name/logs/SplunkPreferredLog_Date.log&lt;BR /&gt;&lt;BR /&gt;
exist, then monitor just /apps/app_name/logs/SplunkPreferredLog_Date.log&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 11:51:13 GMT</pubDate>
    <dc:creator>Ovi</dc:creator>
    <dc:date>2020-09-28T11:51:13Z</dc:date>
    <item>
      <title>SplunkForwarder inputs.conf - pick one log file if exists, else pick another</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/SplunkForwarder-inputs-conf-pick-one-log-file-if-exists-else/m-p/57532#M11239</link>
      <description>&lt;P&gt;Is there a way to configure SplunkForwarder inputs.conf to do the following?&lt;/P&gt;

&lt;P&gt;The goal is to monitor a few directories and tail "default_log_name" application logs but if a "splunk_preferred_log" file exist, then just tail those ones instead, do not pickup the default log files &lt;/P&gt;

&lt;P&gt;Example:&lt;/P&gt;

&lt;P&gt;A. If only /apps/app_name/logs/DefaultAppLog_Date.log exists = monitor that one&lt;/P&gt;

&lt;P&gt;B. If both /apps/app_name/logs/DefaultAppLog_Date.log and&lt;BR /&gt;
           /apps/app_name/logs/SplunkPreferredLog_Date.log&lt;BR /&gt;&lt;BR /&gt;
exist, then monitor just /apps/app_name/logs/SplunkPreferredLog_Date.log&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:51:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/SplunkForwarder-inputs-conf-pick-one-log-file-if-exists-else/m-p/57532#M11239</guid>
      <dc:creator>Ovi</dc:creator>
      <dc:date>2020-09-28T11:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: SplunkForwarder inputs.conf - pick one log file if exists, else pick another</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/SplunkForwarder-inputs-conf-pick-one-log-file-if-exists-else/m-p/57533#M11240</link>
      <description>&lt;P&gt;Hi Ovi&lt;/P&gt;

&lt;P&gt;personally I would do this with a script which checks the files for you. use for example your provided A &amp;amp; B and if there is a match symlinks the log into a separate directory which is monitored by splunk.&lt;/P&gt;

&lt;P&gt;hope this helps, cheers&lt;/P&gt;

&lt;P&gt;MuS&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2012 12:52:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/SplunkForwarder-inputs-conf-pick-one-log-file-if-exists-else/m-p/57533#M11240</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2012-05-23T12:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: SplunkForwarder inputs.conf - pick one log file if exists, else pick another</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/SplunkForwarder-inputs-conf-pick-one-log-file-if-exists-else/m-p/57534#M11241</link>
      <description>&lt;P&gt;Thanks man, that's a pretty sweet idea. &lt;BR /&gt;
My other choice would have been to write a shell script to:&lt;BR /&gt;
-&amp;gt; search for log files -&amp;gt; "patch" the inputs.conf accordingly -&amp;gt; restart splunkd, &lt;BR /&gt;
but your suggestion is much better. &lt;BR /&gt;
I'll give it a try&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2012 13:34:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/SplunkForwarder-inputs-conf-pick-one-log-file-if-exists-else/m-p/57534#M11241</guid>
      <dc:creator>Ovi</dc:creator>
      <dc:date>2012-05-23T13:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: SplunkForwarder inputs.conf - pick one log file if exists, else pick another</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/SplunkForwarder-inputs-conf-pick-one-log-file-if-exists-else/m-p/57535#M11242</link>
      <description>&lt;P&gt;Nope....this solution doesn't work in my case&lt;BR /&gt;
Too many factors to consider like rolling log names by date/time, various log rollup times throughout the day, adjust for outages or maintenance windows..etc&lt;BR /&gt;
Too complex to manage all these possible conditions in a script and having to create/maintain symlinks all the time&lt;BR /&gt;
Still looking for a simpler solution&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2012 16:07:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/SplunkForwarder-inputs-conf-pick-one-log-file-if-exists-else/m-p/57535#M11242</guid>
      <dc:creator>Ovi</dc:creator>
      <dc:date>2012-05-23T16:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: SplunkForwarder inputs.conf - pick one log file if exists, else pick another</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/SplunkForwarder-inputs-conf-pick-one-log-file-if-exists-else/m-p/57536#M11243</link>
      <description>&lt;P&gt;well, your provided example is a simple 'if else' script and I still think it is the best and easiest way to check for the files you want and not for any rolled ones. feel free to supply your solution &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2012 06:53:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/SplunkForwarder-inputs-conf-pick-one-log-file-if-exists-else/m-p/57536#M11243</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2012-05-24T06:53:16Z</dc:date>
    </item>
  </channel>
</rss>

