Getting Data In

Configure input.conf

moohkhol
New Member

All,

I want to monitor Apache log and file name is appended with date, so it's dynamic file. eg,

Log directory:
/var/apache/logs/
File name is,
apache_log.2014.02.20
apache_log.2014.02.19
apache_log.2014.02.18
apache_log.2014.02.17.gz
apache_log.2014.02.16.gz

Running log is coming into apache_log.2014.02.20 and I also want to ignore all the files with *.gz name, since old files are getting archived and present into same directory (/var/apache/logs/).
Please some one can give details about stanza of input.conf and other details if required.

Tags (2)
0 Karma

moohkhol
New Member

Yes, Thankx

0 Karma

Ayn
Legend

Note that the file is called "inputs.conf", not input.conf.

0 Karma

kristian_kolb
Ultra Champion

Name your index and sourcetype - the latter likely to access_combined, or access_common

[monitor:///var/apache/log/apache_log*]
index = your_index
sourcetype = your_sourcetype
blacklist = \.gz

/K

0 Karma

kristian_kolb
Ultra Champion

you can add some more information to the monitor path (like above), or define a whitelist as well, which should amount to the same thing. See;

http://docs.splunk.com/Documentation/Splunk/6.0.1/Data/Specifyinputpathswithwildcards#Wildcards_and_...

/K

0 Karma

moohkhol
New Member

Thankx Kristain,
"/var/apache/log/" also contains different logs such as Mod_jk, error, ssl logs, so i want to specify something like that, Monitor should able to read file only with name of apache_log... and i can also able to specify it should not read before some date, lets say if I am configuring today than it should start from today should not read apache_log.2014.02.19 apache_log.2014.02.18 file.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...