Getting Data In

Configuring Apache log data forwarding

compsavvystu
Engager

I have a linux web server (Ubuntu 10.04 x64) that I would like to forward apache log data from. I have installed the universal forwarder. How do I configure it to forward log data to my splunk server?

If this is well documented, I apologize. I'm having difficulty finding this info.

Thanks.

twinspop
Influencer

Minimally, in /opt/splunkforwarder/etc/system/local

outputs.conf:

[tcpout:somelabel]
server=192.168.0.1:9997

inputs.conf:

[monitor:///path/yo/your/access_log]
sourcetype = access_log

On the receiving end, you'll need to activate a corresponding receiving port under Management -> Forwrding/Receiving. (In this case, and by default, 9997.)

lguinn2
Legend

You can use a wild card, and that's better than a separate monitor stanza for each file. If you need something more sophisticated, you can add either a whitelist or a blacklist to the spec.

There is a new manual called "Getting Data In." Start here (http://www.splunk.com/base/Documentation/latest/Data/Configureyourinputs#Edit_inputs.conf) in the manual for help with inputs.conf

0 Karma

compsavvystu
Engager

for the monitor, can I specify a wildcard in the access_log path (like /path/to/*.log, or does a separate [monitor] line need to be specified for each access_log?

0 Karma
Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...