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