· 6 years ago · Nov 29, 2019, 04:50 PM
1###################### Filebeat Configuration Example #########################
2
3# This file is an example configuration file highlighting only the most common
4# options. The filebeat.reference.yml file from the same directory contains all the
5# supported options with more comments. You can use it as a reference.
6#
7# You can find the full configuration reference here:
8# https://www.elastic.co/guide/en/beats/filebeat/index.html
9
10# For more available modules and options, please see the filebeat.reference.yml sample
11# configuration file.
12
13#=========================== Filebeat inputs =============================
14
15filebeat.inputs:
16
17# Each - is an input. Most options can be set at the input level, so
18# you can use different inputs for various configurations.
19# Below are the input specific configurations.
20
21- type: log
22
23 # Change to true to enable this input configuration.
24 enabled: true
25
26 # Paths that should be crawled and fetched. Glob based paths.
27 paths:
28 - /Users/morrison/Work/logs/logs/md/*
29 index: md
30
31- type: log
32 # Change to true to enable this input configuration.
33 enabled: true
34
35 # Paths that should be crawled and fetched. Glob based paths.
36 paths:
37 - /Users/morrison/Work/logs/logs/important/*
38 index: important
39
40 #- c:\programdata\elasticsearch\logs\*
41
42 # Exclude lines. A list of regular expressions to match. It drops the lines that are
43 # matching any regular expression from the list.
44 #exclude_lines: ['^DBG']
45
46 # Include lines. A list of regular expressions to match. It exports the lines that are
47 # matching any regular expression from the list.
48 #include_lines: ['^ERR', '^WARN']
49
50 # Exclude files. A list of regular expressions to match. Filebeat drops the files that
51 # are matching any regular expression from the list. By default, no files are dropped.
52 #exclude_files: ['.gz$']
53
54 # Optional additional fields. These fields can be freely picked
55 # to add additional information to the crawled log files for filtering
56 #fields:
57 # level: debug
58 # review: 1
59
60 ### Multiline options
61
62 # Multiline can be used for log messages spanning multiple lines. This is common
63 # for Java Stack Traces or C-Line Continuation
64
65 # The regexp Pattern that has to be matched. The example pattern matches all lines starting with [
66 #multiline.pattern: ^\[
67
68 # Defines if the pattern set under pattern should be negated or not. Default is false.
69 #multiline.negate: false
70
71 # Match can be set to "after" or "before". It is used to define if lines should be append to a pattern
72 # that was (not) matched before or after or as long as a pattern is not matched based on negate.
73 # Note: After is the equivalent to previous and before is the equivalent to to next in Logstash
74 #multiline.match: after
75
76
77#============================= Filebeat modules ===============================
78
79filebeat.config.modules:
80 # Glob pattern for configuration loading
81 path: ${path.config}/modules.d/*.yml
82
83 # Set to true to enable config reloading
84 reload.enabled: false
85
86 # Period on which files under path should be checked for changes
87 #reload.period: 10s
88
89#==================== Elasticsearch template setting ==========================
90
91setup.template.settings:
92 index.number_of_shards: 1
93 #index.codec: best_compression
94 #_source.enabled: false
95
96#================================ General =====================================
97
98# The name of the shipper that publishes the network data. It can be used to group
99# all the transactions sent by a single shipper in the web interface.
100#name:
101
102# The tags of the shipper are included in their own field with each
103# transaction published.
104#tags: ["service-X", "web-tier"]
105
106# Optional fields that you can specify to add additional information to the
107# output.
108#fields:
109# env: staging
110
111
112#============================== Dashboards =====================================
113# These settings control loading the sample dashboards to the Kibana index. Loading
114# the dashboards is disabled by default and can be enabled either by setting the
115# options here or by using the `setup` command.
116#setup.dashboards.enabled: false
117
118# The URL from where to download the dashboards archive. By default this URL
119# has a value which is computed based on the Beat name and version. For released
120# versions, this URL points to the dashboard archive on the artifacts.elastic.co
121# website.
122#setup.dashboards.url:
123
124#============================== Kibana =====================================
125
126# Starting with Beats version 6.0.0, the dashboards are loaded via the Kibana API.
127# This requires a Kibana endpoint configuration.
128#setup.kibana:
129
130 # Kibana Host
131 # Scheme and port can be left out and will be set to the default (http and 5601)
132 # In case you specify and additional path, the scheme is required: http://localhost:5601/path
133 # IPv6 addresses should always be defined as: https://[2001:db8::1]:5601
134 #host: "localhost:5601"
135
136 # Kibana Space ID
137 # ID of the Kibana Space into which the dashboards should be loaded. By default,
138 # the Default Space will be used.
139 #space.id:
140
141#============================= Elastic Cloud ==================================
142
143# These settings simplify using Filebeat with the Elastic Cloud (https://cloud.elastic.co/).
144
145# The cloud.id setting overwrites the `output.elasticsearch.hosts` and
146# `setup.kibana.host` options.
147# You can find the `cloud.id` in the Elastic Cloud web UI.
148#cloud.id:
149
150# The cloud.auth setting overwrites the `output.elasticsearch.username` and
151# `output.elasticsearch.password` settings. The format is `<user>:<pass>`.
152#cloud.auth:
153
154#================================ Outputs =====================================
155
156# Configure what output to use when sending the data collected by the beat.
157
158#-------------------------- Elasticsearch output ------------------------------
159#output.elasticsearch:
160 # Array of hosts to connect to.
161# hosts: ["localhost:9200"]
162
163 # Protocol - either `http` (default) or `https`.
164 #protocol: "https"
165
166 # Authentication credentials - either API key or username/password.
167 #api_key: "id:api_key"
168 #username: "elastic"
169 #password: "changeme"
170
171#----------------------------- Logstash output --------------------------------
172output.logstash:
173 # The Logstash hosts
174 hosts: ["172.26.21.73:5044"]
175
176 # Optional SSL. By default is off.
177 # List of root certificates for HTTPS server verifications
178 #ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
179
180 # Certificate for SSL client authentication
181 #ssl.certificate: "/etc/pki/client/cert.pem"
182
183 # Client Certificate Key
184 #ssl.key: "/etc/pki/client/cert.key"
185
186#================================ Processors =====================================
187
188# Configure processors to enhance or manipulate events generated by the beat.
189
190#processors:
191# - add_host_metadata: ~
192# - add_cloud_metadata: ~
193# - add_docker_metadata: ~
194# - add_kubernetes_metadata: ~
195
196#================================ Logging =====================================
197
198# Sets log level. The default log level is info.
199# Available log levels are: error, warning, info, debug
200#logging.level: debug
201
202# At debug level, you can selectively enable logging only for some components.
203# To enable all selectors use ["*"]. Examples of other selectors are "beat",
204# "publish", "service".
205#logging.selectors: ["*"]
206
207#============================== X-Pack Monitoring ===============================
208# filebeat can export internal metrics to a central Elasticsearch monitoring
209# cluster. This requires xpack monitoring to be enabled in Elasticsearch. The
210# reporting is disabled by default.
211
212# Set to true to enable the monitoring reporter.
213#monitoring.enabled: false
214
215# Sets the UUID of the Elasticsearch cluster under which monitoring data for this
216# Filebeat instance will appear in the Stack Monitoring UI. If output.elasticsearch
217# is enabled, the UUID is derived from the Elasticsearch cluster referenced by output.elasticsearch.
218#monitoring.cluster_uuid:
219
220# Uncomment to send the metrics to Elasticsearch. Most settings from the
221# Elasticsearch output are accepted here as well.
222# Note that the settings should point to your Elasticsearch *monitoring* cluster.
223# Any setting that is not set is automatically inherited from the Elasticsearch
224# output configuration, so if you have the Elasticsearch output configured such
225# that it is pointing to your Elasticsearch monitoring cluster, you can simply
226# uncomment the following line.
227#monitoring.elasticsearch:
228
229#================================= Migration ==================================
230
231# This allows to enable 6.7 migration aliases
232#migration.6_to_7.enabled: true