<?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 for a log file - nix* in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Monitoring-for-a-log-file-nix/m-p/434485#M7807</link>
    <description>&lt;P&gt;@whrg So this is where i still don't understand why the log isn't pulling over to Splunk.. I look at the internal logs for verification the TA downloads onto the server and does everything it needs to do. I see the log for adding watch on path 'opt/application/app/logs/application.log' but nothing is ever sent over to the index for the log in question.. i had created the index and verified it's up but cannot get anything to write from this location.. i don't see anything on the indexers about anything being received.. am missing something? &lt;/P&gt;</description>
    <pubDate>Tue, 11 Dec 2018 18:28:52 GMT</pubDate>
    <dc:creator>Crashfry</dc:creator>
    <dc:date>2018-12-11T18:28:52Z</dc:date>
    <item>
      <title>Monitoring for a log file - nix*</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Monitoring-for-a-log-file-nix/m-p/434479#M7801</link>
      <description>&lt;P&gt;So I have a specific application log i'm attempting to monitor. The log location is basically this: &lt;BR /&gt;
/opt/application/app/logs/application.log. &lt;/P&gt;

&lt;P&gt;My current inputs.conf file looks like this: &lt;BR /&gt;
[monitor:///opt/application/app/logs/application]&lt;BR /&gt;
whitelist=(.log)&lt;BR /&gt;
disabled = 0&lt;BR /&gt;
index = application_audit&lt;BR /&gt;
sourcetype = application_audit&lt;/P&gt;

&lt;P&gt;For the life of me, i cannot get this to work at all, i've looked at the permissions and all seem fine. Is there something i'm missing with the monitor or the white list? I currently have a universal forwarder on this device, so it should send out if it's working. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:23:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Monitoring-for-a-log-file-nix/m-p/434479#M7801</guid>
      <dc:creator>Crashfry</dc:creator>
      <dc:date>2020-09-29T22:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: Monitoring for a log file - nix*</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Monitoring-for-a-log-file-nix/m-p/434480#M7802</link>
      <description>&lt;P&gt;Hello @Crashfry,&lt;/P&gt;

&lt;P&gt;I believe the monitor stanza must refer to a directory or a single file. If it refers to a directory then I can include the whitelist filter.&lt;/P&gt;

&lt;P&gt;Since you want to monitor only one specific file, try it like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///opt/application/app/logs/application.log]
disabled = 0
index = application_audit
sourcetype = application_audit
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For troubleshooting, search for:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_* /opt/application/app
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Dec 2018 16:02:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Monitoring-for-a-log-file-nix/m-p/434480#M7802</guid>
      <dc:creator>whrg</dc:creator>
      <dc:date>2018-12-11T16:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: Monitoring for a log file - nix*</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Monitoring-for-a-log-file-nix/m-p/434481#M7803</link>
      <description>&lt;P&gt;Your monitor stanza is wrong. You should include the &lt;CODE&gt;.log&lt;/CODE&gt; or a &lt;CODE&gt;*&lt;/CODE&gt; at the end like this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///opt/application/app/logs/application.log]
disabled = 0
index = application_audit
sourcetype = application_audit
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Don't forget to restart the Splunk service on the forwarder after making the change&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 16:03:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Monitoring-for-a-log-file-nix/m-p/434481#M7803</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2018-12-11T16:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: Monitoring for a log file - nix*</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Monitoring-for-a-log-file-nix/m-p/434482#M7804</link>
      <description>&lt;P&gt;Alright, so that makes sense, I think where i was questioning myself was the whitelist. So there are other log files in this directory, would I have to be specific in the whitelist? &lt;BR /&gt;
whitelist=\application.log$ &lt;/P&gt;

&lt;P&gt;Would I need to do that for being specific of the log i want in the directory? &lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 16:10:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Monitoring-for-a-log-file-nix/m-p/434482#M7804</guid>
      <dc:creator>Crashfry</dc:creator>
      <dc:date>2018-12-11T16:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: Monitoring for a log file - nix*</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Monitoring-for-a-log-file-nix/m-p/434483#M7805</link>
      <description>&lt;P&gt;I edited my original answer because I initially thought you want to monitor /opt/application/app/logs/*.log.&lt;BR /&gt;
You don't need the whitelist filter to monitor one specific file.&lt;/P&gt;

&lt;P&gt;If you want to monitor additional files, either use a monitor stanza for each new file or use the whitelist filter if they have a similar pattern.&lt;BR /&gt;
Provide the file names so we can help you with that.&lt;/P&gt;

&lt;P&gt;Also, as @skoelpin has pointed out, you need to restart Splunk after making changes to configuration files.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 16:41:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Monitoring-for-a-log-file-nix/m-p/434483#M7805</guid>
      <dc:creator>whrg</dc:creator>
      <dc:date>2018-12-11T16:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: Monitoring for a log file - nix*</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Monitoring-for-a-log-file-nix/m-p/434484#M7806</link>
      <description>&lt;P&gt;So that makes perfect sense. Being a single file, there is no need for adding in the whitelist stanza, just simply call out the specific file in the monitoring stanza. &lt;/P&gt;

&lt;P&gt;I appreciate the help, i'm going to make those changes here shortly and see if i can the file to show up in Splunk.. i had checked initially how it was setup and see that it's " monitoring for the file " but nothing was coming in.. so i'll see if this makes a difference. &lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 16:54:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Monitoring-for-a-log-file-nix/m-p/434484#M7806</guid>
      <dc:creator>Crashfry</dc:creator>
      <dc:date>2018-12-11T16:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: Monitoring for a log file - nix*</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Monitoring-for-a-log-file-nix/m-p/434485#M7807</link>
      <description>&lt;P&gt;@whrg So this is where i still don't understand why the log isn't pulling over to Splunk.. I look at the internal logs for verification the TA downloads onto the server and does everything it needs to do. I see the log for adding watch on path 'opt/application/app/logs/application.log' but nothing is ever sent over to the index for the log in question.. i had created the index and verified it's up but cannot get anything to write from this location.. i don't see anything on the indexers about anything being received.. am missing something? &lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 18:28:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Monitoring-for-a-log-file-nix/m-p/434485#M7807</guid>
      <dc:creator>Crashfry</dc:creator>
      <dc:date>2018-12-11T18:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: Monitoring for a log file - nix*</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Monitoring-for-a-log-file-nix/m-p/434486#M7808</link>
      <description>&lt;P&gt;Do you see any events when you search for:&lt;BR /&gt;
index=* source="/opt/application/app/logs/application.log" [All Time]?&lt;BR /&gt;
Is your web user allowed to access that index?&lt;BR /&gt;
Is application.log not empty? Perhaps you can paste a few lines here.&lt;BR /&gt;
I assume the splunkd user has read permission on that file since you don't see any errors in the internal logs.&lt;BR /&gt;
Do this search to see if the file was indexed (i.e. used the license):&lt;BR /&gt;
index=_internal source="*license_usage.log" type=usage s="/opt/application/app/logs/application.log"&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:20:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Monitoring-for-a-log-file-nix/m-p/434486#M7808</guid>
      <dc:creator>whrg</dc:creator>
      <dc:date>2020-09-29T22:20:23Z</dc:date>
    </item>
  </channel>
</rss>

