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