i am not getting on how i can add multiple paths in var.paths parameter in apache.yml? i have configured one path but i have multiple log files with different names so how can add those paths too?
# ============================== Filebeat inputs ===============================
filebeat.inputs:
# Each - is an input. Most options can be set at the input level, so
# you can use different inputs for various configurations.
# Below are the input specific configurations.
- type: log
# Change to true to enable this input configuration.
enabled: false
# Paths that should be crawled and fetched. Glob based paths.
paths:
- /var/log/*.log
#- c:\programdata\elasticsearch\logs\*
apache.yml
# Module: apache
# Docs: https://www.elastic.co/guide/en/beats/filebeat/7.x/filebeat-module-apache.html
- module: apache
# Access logs
access:
enabled: true
# Set custom paths for the log files. If left empty,
# Filebeat will choose the paths depending on your OS.
var.paths: ['/var/log/apache2/access.log*']
# Error logs
error:
enabled: true
# Set custom paths for the log files. If left empty,
# Filebeat will choose the paths depending on your OS.
var.paths: ['/var/log/apache2/error.log*']
how i can configure apache.yml for multple paths of log files?
Hi jsriano,
Thanks for the reply..Its really helpful.
I have one another doubt,
Can you please tell me difference in filebeat.input paths and modules path?
Inputs and modules are two differenct concepts in Filebeat, inputs define how logs should be collected by filebeat, while modules cover different aspects of data collection for an specific service.
For example the Apache module uses the log input under the hood to collect Apache logs, and it also includes processors and ingest pipelines to parse these logs, and Kibana dashboards to visualize the parsed information.
If you want to collect logs from an Apache server, I would suggest to use the Apache module, then you wouldn't need to define any input under filebeat.inputs.
On the other hand, if you want to collect logs from a custom application, or a service that doesn't have a module, you could define your own inputs, processors and pipelines.
i have another question, currently i want to get two different logs in two different indices.
i have apache enable and tomcat access logs. this two i want store in two different indices how can i achieve this? i am not using logstash.
Why do you want to have different indexes for these logs? This is possible, but can increase the complexity of your deployment, and make it more problems-prone if not done with a lot of care.
Filebeat automatically configures the indexes it uses and this configuration uses to be enough for most of the cases. Using custom indexing strategies requires you to manage several things that otherwise would be automated.
As a side note, with Fleet/Agent (in beta), the default is to use different indexes for each integration, and this is automatically managed by Fleet. Perhaps you can give it a try to see if it better fits your needings.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.