I'm using filebeat on a debian 10 to ship logfiles directly to elasticsearch und use kibana as the GUI to display an filter those files, as it's supposed to be. The problem is, that the configurations i make doesnt have any effect.
I set the paths that filebeat should harvest in the filebeat.input section. I even set the paths to exclude the paths it should not harvest. I've tried to set the paths in single quotes, double qoutes, no qoutes at all, nothing stops filebeat to harvest the wrong files.
Any idea what am i doing wrong?
Here the filebeat.yml:
#=========================== 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: true
Paths that should be crawled and fetched. Glob based paths.
paths:
- /var/log/syslogfolder/folder_A/syslogfile_A.log
- /var/log/syslogfolder/folder_B/syslogfile_B.log
- /var/log/syslogfolder/folder_C/syslogfile_C.log
#- c:\programdata\elasticsearch\logs*
ignore_older: 24h
exclude_files:
- /var/log/syslog
- /var/log/.log
- /var/log/.gz
#============================= Filebeat modules ===============================
filebeat.config.modules:
Glob pattern for configuration loading
path: ${path.config}/modules.d/*.yml
Set to true to enable config reloading
#reload.enabled: false
Period on which files under path should be checked for changes
#reload.period: 10s
#==================== Elasticsearch template setting ==========================
setup.template.settings:
index.number_of_shards: 1
#index.codec: best_compression
#_source.enabled: false
#================================ Outputs =====================================
Configure what output to use when sending the data collected by the beat.
#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
Array of hosts to connect to.
hosts: ["localhost:9200"]
processors:
- add_host_metadata: ~
- add_cloud_metadata: ~