filebeat设置多个路径配置

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

点击加入QQ群交流:415777345

彩蛋

欢迎加入请求群学习交流:
Java/Python架构师①群:415777345
电脑PC用户快捷加入(点击超链接):415777345
手机QQ扫码加入:
在这里插入图片描述
SpringBoot SpringCloud Docker K8s ①群:317945902
电脑PC用户快捷加入(点击超链接):317945902
手机QQ扫码加入:
在这里插入图片描述
欢迎进群交流探讨!

发表评论

表情:
评论列表 (有 0 条评论,783人围观)

还没有评论,来说两句吧...

相关阅读