filebeat.yml 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  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. - /var/log/connector-app/*.log
  21. #- c:\programdata\elasticsearch\logs\*
  22. # Exclude lines. A list of regular expressions to match. It drops the lines that are
  23. # matching any regular expression from the list.
  24. #exclude_lines: ['^DBG']
  25. # Include lines. A list of regular expressions to match. It exports the lines that are
  26. # matching any regular expression from the list.
  27. #include_lines: ['^ERR', '^WARN']
  28. # Exclude files. A list of regular expressions to match. Filebeat drops the files that
  29. # are matching any regular expression from the list. By default, no files are dropped.
  30. #exclude_files: ['.gz$']
  31. # Optional additional fields. These fields can be freely picked
  32. # to add additional information to the crawled log files for filtering
  33. fields:
  34. tags: ['json']
  35. # level: debug
  36. # review: 1
  37. ### Multiline options
  38. # Multiline can be used for log messages spanning multiple lines. This is common
  39. # for Java Stack Traces or C-Line Continuation
  40. # The regexp Pattern that has to be matched. The example pattern matches all lines starting with [
  41. #multiline.pattern: ^\[
  42. # Defines if the pattern set under pattern should be negated or not. Default is false.
  43. #multiline.negate: false
  44. # Match can be set to "after" or "before". It is used to define if lines should be append to a pattern
  45. # that was (not) matched before or after or as long as a pattern is not matched based on negate.
  46. # Note: After is the equivalent to previous and before is the equivalent to to next in Logstash
  47. #multiline.match: after
  48. #============================= Filebeat modules ===============================
  49. filebeat.config.modules:
  50. # Glob pattern for configuration loading
  51. path: ${path.config}/modules.d/*.yml
  52. # Set to true to enable config reloading
  53. reload.enabled: false
  54. # Period on which files under path should be checked for changes
  55. #reload.period: 10s
  56. #==================== Elasticsearch template setting ==========================
  57. setup.template.settings:
  58. index.number_of_shards: 1
  59. #index.codec: best_compression
  60. #_source.enabled: false
  61. #================================ General =====================================
  62. # The name of the shipper that publishes the network data. It can be used to group
  63. # all the transactions sent by a single shipper in the web interface.
  64. #name:
  65. # The tags of the shipper are included in their own field with each
  66. # transaction published.
  67. #tags: ["service-X", "web-tier"]
  68. # Optional fields that you can specify to add additional information to the
  69. # output.
  70. fields:
  71. build.profile: ${BUILD_PROFILE}
  72. # env: staging
  73. #============================== Dashboards =====================================
  74. # These settings control loading the sample dashboards to the Kibana index. Loading
  75. # the dashboards is disabled by default and can be enabled either by setting the
  76. # options here or by using the `setup` command.
  77. #setup.dashboards.enabled: false
  78. # The URL from where to download the dashboards archive. By default this URL
  79. # has a value which is computed based on the Beat name and version. For released
  80. # versions, this URL points to the dashboard archive on the artifacts.elastic.co
  81. # website.
  82. #setup.dashboards.url:
  83. #============================== Kibana =====================================
  84. # Starting with Beats version 6.0.0, the dashboards are loaded via the Kibana API.
  85. # This requires a Kibana endpoint configuration.
  86. setup.kibana:
  87. # Kibana Host
  88. # Scheme and port can be left out and will be set to the default (http and 5601)
  89. # In case you specify and additional path, the scheme is required: http://localhost:5601/path
  90. # IPv6 addresses should always be defined as: https://[2001:db8::1]:5601
  91. #host: "localhost:5601"
  92. # Kibana Space ID
  93. # ID of the Kibana Space into which the dashboards should be loaded. By default,
  94. # the Default Space will be used.
  95. #space.id:
  96. #============================= Elastic Cloud ==================================
  97. # These settings simplify using Filebeat with the Elastic Cloud (https://cloud.elastic.co/).
  98. # The cloud.id setting overwrites the `output.elasticsearch.hosts` and
  99. # `setup.kibana.host` options.
  100. # You can find the `cloud.id` in the Elastic Cloud web UI.
  101. #cloud.id:
  102. # The cloud.auth setting overwrites the `output.elasticsearch.username` and
  103. # `output.elasticsearch.password` settings. The format is `<user>:<pass>`.
  104. #cloud.auth:
  105. #================================ Outputs =====================================
  106. # Configure what output to use when sending the data collected by the beat.
  107. #-------------------------- Elasticsearch output ------------------------------
  108. # output.elasticsearch:
  109. # Array of hosts to connect to.
  110. # hosts: ["localhost:9200"]
  111. # Optional protocol and basic auth credentials.
  112. #protocol: "https"
  113. #username: "elastic"
  114. #password: "changeme"
  115. #----------------------------- Logstash output --------------------------------
  116. output.logstash:
  117. # The Logstash hosts
  118. hosts: ["localhost:5044", "172.23.0.2:5044"]
  119. # Optional SSL. By default is off.
  120. # List of root certificates for HTTPS server verifications
  121. #ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
  122. # Certificate for SSL client authentication
  123. #ssl.certificate: "/etc/pki/client/cert.pem"
  124. # Client Certificate Key
  125. #ssl.key: "/etc/pki/client/cert.key"
  126. #================================ Processors =====================================
  127. # Configure processors to enhance or manipulate events generated by the beat.
  128. processors:
  129. - add_host_metadata: ~
  130. - add_cloud_metadata: ~
  131. - drop_fields:
  132. fields: ["beat.name", "beat.hostname", "beat.version", "host.os.family", "host.os.version", "host.architecture", "host.containerized"]
  133. #================================ Logging =====================================
  134. # Sets log level. The default log level is info.
  135. # Available log levels are: error, warning, info, debug
  136. #logging.level: debug
  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. #============================== Xpack Monitoring ===============================
  142. # filebeat can export internal metrics to a central Elasticsearch monitoring
  143. # cluster. This requires xpack monitoring to be enabled in Elasticsearch. The
  144. # reporting is disabled by default.
  145. # Set to true to enable the monitoring reporter.
  146. #monitoring.enabled: false
  147. # Uncomment to send the metrics to Elasticsearch. Most settings from the
  148. # Elasticsearch output are accepted here as well.
  149. # Note that the settings should point to your Elasticsearch *monitoring* cluster.
  150. # Any setting that is not set is automatically inherited from the Elasticsearch
  151. # output configuration, so if you have the Elasticsearch output configured such
  152. # that it is pointing to your Elasticsearch monitoring cluster, you can simply
  153. # uncomment the following line.
  154. #monitoring.elasticsearch:
  155. #================================= Migration ==================================
  156. # This allows to enable 6.7 migration aliases
  157. #migration.6_to_7.enabled: true