Advertisement
Guest User

filebeat.yml

a guest
Jan 9th, 2024
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.41 KB | None | 0 0
  1. # cat /etc/filebeat/filebeat.yml
  2. ###################### Filebeat Configuration Example #########################
  3.  
  4. # This file is an example configuration file highlighting only the most common
  5. # options. The filebeat.reference.yml file from the same directory contains all the
  6. # supported options with more comments. You can use it as a reference.
  7. #
  8. # You can find the full configuration reference here:
  9. # https://www.elastic.co/guide/en/beats/filebeat/index.html
  10.  
  11. # For more available modules and options, please see the filebeat.reference.yml sample
  12. # configuration file.
  13.  
  14. # ============================== Filebeat inputs ===============================
  15.  
  16. filebeat.inputs:
  17.  
  18. # Each - is an input. Most options can be set at the input level, so
  19. # you can use different inputs for various configurations.
  20. # Below are the input specific configurations.
  21.  
  22. # filestream is an input for collecting log messages from files.
  23. - type: filestream
  24.  
  25. # Unique ID among all inputs, an ID is required.
  26. id: my-filestream-id
  27.  
  28. # Change to true to enable this input configuration.
  29. enabled: false
  30.  
  31. # Paths that should be crawled and fetched. Glob based paths.
  32. paths:
  33. - /var/log/syslog
  34. #- c:\programdata\elasticsearch\logs\*
  35.  
  36. # Exclude lines. A list of regular expressions to match. It drops the lines that are
  37. # matching any regular expression from the list.
  38. #exclude_lines: ['^DBG']
  39.  
  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.  
  44. # Exclude files. A list of regular expressions to match. Filebeat drops the files that
  45. # are matching any regular expression from the list. By default, no files are dropped.
  46. #prospector.scanner.exclude_files: ['.gz$']
  47.  
  48. # Optional additional fields. These fields can be freely picked
  49. # to add additional information to the crawled log files for filtering
  50. #fields:
  51. # level: debug
  52. # review: 1
  53.  
  54. # ============================== Filebeat modules ==============================
  55.  
  56. filebeat.config.modules:
  57. # Glob pattern for configuration loading
  58. path: ${path.config}/modules.d/*.yml
  59.  
  60. # Set to true to enable config reloading
  61. reload.enabled: false
  62.  
  63. # Period on which files under path should be checked for changes
  64. #reload.period: 10s
  65.  
  66. # ======================= Elasticsearch template setting =======================
  67.  
  68. setup.template.settings:
  69. index.number_of_shards: 1
  70. #index.codec: best_compression
  71. #_source.enabled: false
  72.  
  73.  
  74. # ================================== General ===================================
  75.  
  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.  
  80. # The tags of the shipper are included in their own field with each
  81. # transaction published.
  82. #tags: ["service-X", "web-tier"]
  83.  
  84. # Optional fields that you can specify to add additional information to the
  85. # output.
  86. #fields:
  87. # env: staging
  88.  
  89. # ================================= Dashboards =================================
  90. # These settings control loading the sample dashboards to the Kibana index. Loading
  91. # the dashboards is disabled by default and can be enabled either by setting the
  92. # options here or by using the `setup` command.
  93. #setup.dashboards.enabled: false
  94.  
  95. # The URL from where to download the dashboards archive. By default this URL
  96. # has a value which is computed based on the Beat name and version. For released
  97. # versions, this URL points to the dashboard archive on the artifacts.elastic.co
  98. # website.
  99. #setup.dashboards.url:
  100.  
  101. # =================================== Kibana ===================================
  102.  
  103. # Starting with Beats version 6.0.0, the dashboards are loaded via the Kibana API.
  104. # This requires a Kibana endpoint configuration.
  105. setup.kibana:
  106.  
  107. # Kibana Host
  108. # Scheme and port can be left out and will be set to the default (http and 5601)
  109. # In case you specify and additional path, the scheme is required: http://localhost:5601/path
  110. # IPv6 addresses should always be defined as: https://[2001:db8::1]:5601
  111. #host: "localhost:5601"
  112.  
  113. # Kibana Space ID
  114. # ID of the Kibana Space into which the dashboards should be loaded. By default,
  115. # the Default Space will be used.
  116. #space.id:
  117.  
  118. # =============================== Elastic Cloud ================================
  119.  
  120. # These settings simplify using Filebeat with the Elastic Cloud (https://cloud.elastic.co/).
  121.  
  122. # The cloud.id setting overwrites the `output.elasticsearch.hosts` and
  123. # `setup.kibana.host` options.
  124. # You can find the `cloud.id` in the Elastic Cloud web UI.
  125. #cloud.id:
  126.  
  127. # The cloud.auth setting overwrites the `output.elasticsearch.username` and
  128. # `output.elasticsearch.password` settings. The format is `<user>:<pass>`.
  129. #cloud.auth:
  130.  
  131. # ================================== Outputs ===================================
  132.  
  133. # Configure what output to use when sending the data collected by the beat.
  134.  
  135. # ---------------------------- Elasticsearch Output ----------------------------
  136. #output.elasticsearch:
  137. # Array of hosts to connect to.
  138. # hosts: ["localhost:9200"]
  139.  
  140. # Protocol - either `http` (default) or `https`.
  141. #protocol: "https"
  142.  
  143. # Authentication credentials - either API key or username/password.
  144. #api_key: "id:api_key"
  145. #username: "elastic"
  146. #password: "changeme"
  147.  
  148. # ------------------------------ Logstash Output -------------------------------
  149. output.logstash:
  150. # The Logstash hosts
  151. hosts: ["localhost:5044"]
  152.  
  153. # Optional SSL. By default is off.
  154. # List of root certificates for HTTPS server verifications
  155. #ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
  156.  
  157. # Certificate for SSL client authentication
  158. #ssl.certificate: "/etc/pki/client/cert.pem"
  159.  
  160. # Client Certificate Key
  161. #ssl.key: "/etc/pki/client/cert.key"
  162.  
  163. # ================================= Processors =================================
  164. processors:
  165. - add_host_metadata:
  166. when.not.contains.tags: forwarded
  167. - add_cloud_metadata: ~
  168. - add_docker_metadata: ~
  169. - add_kubernetes_metadata: ~
  170.  
  171. # ================================== Logging ===================================
  172.  
  173. # Sets log level. The default log level is info.
  174. # Available log levels are: error, warning, info, debug
  175. #logging.level: debug
  176.  
  177. # At debug level, you can selectively enable logging only for some components.
  178. # To enable all selectors use ["*"]. Examples of other selectors are "beat",
  179. # "publisher", "service".
  180. #logging.selectors: ["*"]
  181.  
  182. # ============================= X-Pack Monitoring ==============================
  183. # Filebeat can export internal metrics to a central Elasticsearch monitoring
  184. # cluster. This requires xpack monitoring to be enabled in Elasticsearch. The
  185. # reporting is disabled by default.
  186.  
  187. # Set to true to enable the monitoring reporter.
  188. #monitoring.enabled: false
  189.  
  190. # Sets the UUID of the Elasticsearch cluster under which monitoring data for this
  191. # Filebeat instance will appear in the Stack Monitoring UI. If output.elasticsearch
  192. # is enabled, the UUID is derived from the Elasticsearch cluster referenced by output.elasticsearch.
  193. #monitoring.cluster_uuid:
  194.  
  195. # Uncomment to send the metrics to Elasticsearch. Most settings from the
  196. # Elasticsearch output are accepted here as well.
  197. # Note that the settings should point to your Elasticsearch *monitoring* cluster.
  198. # Any setting that is not set is automatically inherited from the Elasticsearch
  199. # output configuration, so if you have the Elasticsearch output configured such
  200. # that it is pointing to your Elasticsearch monitoring cluster, you can simply
  201. # uncomment the following line.
  202. #monitoring.elasticsearch:
  203.  
  204. # ============================== Instrumentation ===============================
  205.  
  206. # Instrumentation support for the filebeat.
  207. #instrumentation:
  208. # Set to true to enable instrumentation of filebeat.
  209. #enabled: false
  210.  
  211. # Environment in which filebeat is running on (eg: staging, production, etc.)
  212. #environment: ""
  213.  
  214. # APM Server hosts to report instrumentation results to.
  215. #hosts:
  216. # - http://localhost:8200
  217.  
  218. # API Key for the APM Server(s).
  219. # If api_key is set then secret_token will be ignored.
  220. #api_key:
  221.  
  222. # Secret token for the APM Server(s).
  223. #secret_token:
  224.  
  225.  
  226. # ================================= Migration ==================================
  227.  
  228. # This allows to enable 6.7 migration aliases
  229. #migration.6_to_7.enabled: true
  230.  
  231.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement