<?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 Montoring apache logs using splunk in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Montoring-apache-logs-using-splunk/m-p/32099#M5674</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;My requiremenent is to monitor day to day apache access logs and error logs through splunk&lt;BR /&gt;
But the access logs are written as eg:ccess.123.10-08-2012 ,this will be gunzipped in the same location by log rotation script.I dont want to index the gunzip logs ,just I want the current logs&lt;BR /&gt;
The challenge here is - the second numeric in the access log name will keep on changing and obviousuly the date as well.I meant this would be access.xxx.date&lt;/P&gt;

&lt;P&gt;Is there a way I can give the above file name as input in splunk to monitor it on a daily basis?&lt;BR /&gt;
I know if it had been access.log,then I can pass on the name in input file,but the file name change is dynamic.Is  there a way to sort it out please?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 10 Aug 2012 15:00:21 GMT</pubDate>
    <dc:creator>splunker_123</dc:creator>
    <dc:date>2012-08-10T15:00:21Z</dc:date>
    <item>
      <title>Montoring apache logs using splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Montoring-apache-logs-using-splunk/m-p/32099#M5674</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;My requiremenent is to monitor day to day apache access logs and error logs through splunk&lt;BR /&gt;
But the access logs are written as eg:ccess.123.10-08-2012 ,this will be gunzipped in the same location by log rotation script.I dont want to index the gunzip logs ,just I want the current logs&lt;BR /&gt;
The challenge here is - the second numeric in the access log name will keep on changing and obviousuly the date as well.I meant this would be access.xxx.date&lt;/P&gt;

&lt;P&gt;Is there a way I can give the above file name as input in splunk to monitor it on a daily basis?&lt;BR /&gt;
I know if it had been access.log,then I can pass on the name in input file,but the file name change is dynamic.Is  there a way to sort it out please?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2012 15:00:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Montoring-apache-logs-using-splunk/m-p/32099#M5674</guid>
      <dc:creator>splunker_123</dc:creator>
      <dc:date>2012-08-10T15:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: Montoring apache logs using splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Montoring-apache-logs-using-splunk/m-p/32100#M5675</link>
      <description>&lt;P&gt;Yes, if you look at the &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/Inputsconf"&gt;documentation for inputs.conf&lt;/A&gt; you'll see that you can;&lt;/P&gt;

&lt;P&gt;Specify a directory to monitor instead of a specific file - &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///var/log/httpd]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Set the sourcetype -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=access_combined
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;here you can also limit what files to monitor through a blacklist -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;blacklist = .gz
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and if splunk should ignore older files&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ignoreOlderThan = 7d
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When searching, you can find all your logs through the sourcetype, regardless what the filename was. &lt;/P&gt;

&lt;P&gt;Hope this helps,&lt;/P&gt;

&lt;P&gt;Kristian&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2012 06:24:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Montoring-apache-logs-using-splunk/m-p/32100#M5675</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2012-08-13T06:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: Montoring apache logs using splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Montoring-apache-logs-using-splunk/m-p/32101#M5676</link>
      <description>&lt;P&gt;Thank you so much ,it is working.&lt;BR /&gt;
But I need to monitor both apache and plugin logs which is under same location.&lt;BR /&gt;
At the moment my inputs.conf file looks like below&lt;/P&gt;

&lt;P&gt;[monitor:///var/log/httpd]&lt;BR /&gt;
sourcetype=access_combined&lt;BR /&gt;
blacklist = .gz&lt;/P&gt;

&lt;P&gt;[monitor:///var/log/httpd/http_plugin.log]&lt;/P&gt;

&lt;P&gt;The issue is http_plugin.log is not getting indexed ,all the apache logs are indexed.Do I have to add anything else in inputs.conf please?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2012 12:38:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Montoring-apache-logs-using-splunk/m-p/32101#M5676</guid>
      <dc:creator>splunker_123</dc:creator>
      <dc:date>2012-08-15T12:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: Montoring apache logs using splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Montoring-apache-logs-using-splunk/m-p/32102#M5677</link>
      <description>&lt;P&gt;You should be aware that your &lt;CODE&gt;[monitor:///var/log/httpd]&lt;/CODE&gt; will match the http_plugin.log as well and have the same sourcetype, i.e. access_combined.&lt;/P&gt;

&lt;P&gt;Perhaps something like the following would work better.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
[monitor:///var/log/httpd/access*]&lt;BR /&gt;
sourcetype=access_combined&lt;BR /&gt;
blacklist = .gz&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;[monitor:///var/log/httpd/http*]&lt;BR /&gt;
sourcetype=http_plugin&lt;BR /&gt;
blacklist = .gz&lt;BR /&gt;
&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:16:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Montoring-apache-logs-using-splunk/m-p/32102#M5677</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2020-09-28T12:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Montoring apache logs using splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Montoring-apache-logs-using-splunk/m-p/32103#M5678</link>
      <description>&lt;P&gt;Awesome.thankyou ..that worked like a charm&lt;BR /&gt;
One last question... &lt;BR /&gt;
when I try to view the logs through splunk web ,it reads, each line by line with space inbetween with numbers attached to each line.Can I make it to view as a single file for eg:assume I'm opening  the same log file in textpad it will not have any space in between lines or numbers to it? Is it possible to display the log files in that fashion?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2012 16:40:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Montoring-apache-logs-using-splunk/m-p/32103#M5678</guid>
      <dc:creator>splunker_123</dc:creator>
      <dc:date>2012-08-15T16:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Montoring apache logs using splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Montoring-apache-logs-using-splunk/m-p/32104#M5679</link>
      <description>&lt;P&gt;well, that's not really the point of indexing events, but you can at least have a partial likeness to the original file by clicking the little blue down-arrow next to an event and choose 'show source'.&lt;/P&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2012 16:48:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Montoring-apache-logs-using-splunk/m-p/32104#M5679</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2012-08-15T16:48:51Z</dc:date>
    </item>
  </channel>
</rss>

