· 6 years ago · Oct 21, 2019, 12:44 AM
1###################### Metricbeat Configuration Example #######################
2
3# This file is an example configuration file highlighting only the most common
4# options. The metricbeat.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/metricbeat/index.html
9queue_mem:
10 events: 4096
11 flush_min_events: 512
12 flush_timeout: 5s
13
14#========================== Modules configuration ============================
15
16metricbeat.config.modules:
17 # Glob pattern for configuration loading
18 path: ${path.config}/modules.d/*.yml
19
20 # Set to true to enable config reloading
21 reload.enabled: false
22
23 # Period on which files under path should be checked for changes
24 reload.period: 10s
25
26#==================== Elasticsearch template setting ==========================
27
28setup.template.settings:
29 index.number_of_shards: 1
30 index.codec: best_compression
31 #_source.enabled: false
32
33#================================ General =====================================
34
35# The name of the shipper that publishes the network data. It can be used to group
36# all the transactions sent by a single shipper in the web interface.
37#name:
38
39# The tags of the shipper are included in their own field with each
40# transaction published.
41#tags: ["service-X", "web-tier"]
42
43# Optional fields that you can specify to add additional information to the
44# output.
45#fields:
46# env: staging
47
48
49#============================== Dashboards =====================================
50# These settings control loading the sample dashboards to the Kibana index. Loading
51# the dashboards is disabled by default and can be enabled either by setting the
52# options here or by using the `setup` command.
53setup.dashboards.enabled: true
54
55# The URL from where to download the dashboards archive. By default this URL
56# has a value which is computed based on the Beat name and version. For released
57# versions, this URL points to the dashboard archive on the artifacts.elastic.co
58# website.
59#setup.dashboards.url:
60
61#============================== Kibana =====================================
62
63# Starting with Beats version 6.0.0, the dashboards are loaded via the Kibana API.
64# This requires a Kibana endpoint configuration.
65setup.kibana:
66
67 # Kibana Host
68 # Scheme and port can be left out and will be set to the default (http and 5601)
69 # In case you specify and additional path, the scheme is required: http://localhost:5601/path
70 # IPv6 addresses should always be defined as: https://[2001:db8::1]:5601
71 host: "https://192.168.X.X:5601"
72 username: "elastic"
73 password: "XXXXWfUUz"
74 ssl.certificate_authorities: ["/etc/metricbeat/certs/ca/ca.crt"]
75 # Kibana Space ID
76 # ID of the Kibana Space into which the dashboards should be loaded. By default,
77 # the Default Space will be used.
78 #space.id:
79
80
81#============================= Elastic Cloud ==================================
82
83# These settings simplify using Metricbeat with the Elastic Cloud (https://cloud.elastic.co/).
84
85# The cloud.id setting overwrites the `output.elasticsearch.hosts` and
86# `setup.kibana.host` options.
87# You can find the `cloud.id` in the Elastic Cloud web UI.
88#cloud.id:
89
90# The cloud.auth setting overwrites the `output.elasticsearch.username` and
91# `output.elasticsearch.password` settings. The format is `<user>:<pass>`.
92#cloud.auth:
93
94#================================ Outputs =====================================
95
96# Configure what output to use when sending the data collected by the beat.
97
98#-------------------------- Elasticsearch output ------------------------------
99output.elasticsearch:
100 # Array of hosts to connect to.
101 hosts: ["192.168.X.X:9200"]
102
103 # Optional protocol and basic auth credentials.
104 protocol: "https"
105 username: "elastic"
106 password: "8XXXXXXqXyWfUUz"
107 ssl.certificate_authorities: ["/etc/metricbeat/certs/ca/ca.crt"]
108#----------------------------- Logstash output --------------------------------
109#output.logstash:
110 # The Logstash hosts
111 #hosts: ["localhost:5044"]
112
113 # Optional SSL. By default is off.
114 # List of root certificates for HTTPS server verifications
115 #ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
116
117 # Certificate for SSL client authentication
118 #ssl.certificate: "/etc/pki/client/cert.pem"
119
120 # Client Certificate Key
121 #ssl.key: "/etc/pki/client/cert.key"
122
123#================================ Processors =====================================
124
125# Configure processors to enhance or manipulate events generated by the beat.
126
127processors:
128 - add_host_metadata: ~
129 - add_cloud_metadata: ~
130
131#================================ Logging =====================================
132
133# Sets log level. The default log level is info.
134# Available log levels are: error, warning, info, debug
135#logging.level: debug
136
137# At debug level, you can selectively enable logging only for some components.
138# To enable all selectors use ["*"]. Examples of other selectors are "beat",
139# "publish", "service".
140#logging.selectors: ["*"]
141
142#============================== Xpack Monitoring ===============================
143# metricbeat can export internal metrics to a central Elasticsearch monitoring
144# cluster. This requires xpack monitoring to be enabled in Elasticsearch. The
145# reporting is disabled by default.
146
147# Set to true to enable the monitoring reporter.
148monitoring.enabled: true
149
150# Sets the UUID of the Elasticsearch cluster under which monitoring data for this
151# Metricbeat instance will appear in the Stack Monitoring UI. If output.elasticsearch
152# is enabled, the UUID is derived from the Elasticsearch cluster referenced by output.elasticsearch.
153#monitoring.cluster_uuid:
154
155# Uncomment to send the metrics to Elasticsearch. Most settings from the
156# Elasticsearch output are accepted here as well.
157# Note that the settings should point to your Elasticsearch *monitoring* cluster.
158# Any setting that is not set is automatically inherited from the Elasticsearch
159# output configuration, so if you have the Elasticsearch output configured such
160# that it is pointing to your Elasticsearch monitoring cluster, you can simply
161# uncomment the following line.
162#monitoring.elasticsearch:
163
164#================================= Migration ==================================
165
166# This allows to enable 6.7 migration aliases
167#migration.6_to_7.enabled: true