filebeat.yml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. ###################### Filebeat Configuration Example #########################
  2. # This file is an example configuration file highlighting only the most common
  3. # options. The filebeat.full.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. #=========================== Filebeat prospectors =============================
  9. filebeat.prospectors:
  10. # Each - is a prospector. Most options can be set at the prospector level, so
  11. # you can use different prospectors for various configurations.
  12. # Below are the prospector specific configurations.
  13. - input_type: log
  14. # Paths that should be crawled and fetched. Glob based paths.
  15. paths:
  16. - "/root/nginx/*.log"
  17. #- "/root/docker/*/*.log"
  18. #- "/root/php7/*.log"
  19. #- c:\programdata\elasticsearch\logs\*
  20. encoding: utf-8
  21. # Exclude lines. A list of regular expressions to match. It drops the lines that are
  22. # matching any regular expression from the list.
  23. #exclude_lines: ["^DBG"]
  24. # Include lines. A list of regular expressions to match. It exports the lines that are
  25. # matching any regular expression from the list.
  26. #include_lines: ["^ERR", "^WARN"]
  27. # Exclude files. A list of regular expressions to match. Filebeat drops the files that
  28. # are matching any regular expression from the list. By default, no files are dropped.
  29. #exclude_files: [".gz$"]
  30. # Optional additional fields. These field can be freely picked
  31. # to add additional information to the crawled log files for filtering
  32. #fields:
  33. # level: debug
  34. # review: 1
  35. close_older: 24h
  36. ### Multiline options
  37. # Mutiline can be used for log messages spanning multiple lines. This is common
  38. # for Java Stack Traces or C-Line Continuation
  39. # The regexp Pattern that has to be matched. The example pattern matches all lines starting with [
  40. #multiline.pattern: ^\[
  41. # Defines if the pattern set under pattern should be negated or not. Default is false.
  42. #multiline.negate: false
  43. # Match can be set to "after" or "before". It is used to define if lines should be append to a pattern
  44. # that was (not) matched before or after or as long as a pattern is not matched based on negate.
  45. # Note: After is the equivalent to previous and before is the equivalent to to next in Logstash
  46. #multiline.match: after
  47. #================================ General =====================================
  48. # The name of the shipper that publishes the network data. It can be used to group
  49. # all the transactions sent by a single shipper in the web interface.
  50. #name:
  51. # The tags of the shipper are included in their own field with each
  52. # transaction published.
  53. #tags: ["service-X", "web-tier"]
  54. # Optional fields that you can specify to add additional information to the
  55. # output.
  56. #fields:
  57. # env: staging
  58. #================================ Outputs =====================================
  59. # Configure what outputs to use when sending the data collected by the beat.
  60. # Multiple outputs may be used.
  61. #-------------------------- Elasticsearch output ------------------------------
  62. output.elasticsearch:
  63. # Array of hosts to connect to.
  64. hosts: ["elk-es:9200"]
  65. # Optional protocol and basic auth credentials.
  66. #protocol: "https"
  67. username: "elastic"
  68. password: "changeme"
  69. #index: "nginx-%{+yyyy.MM.dd}"
  70. #curl -XPUT 'http://elk-ek:9200/_ingest/pipeline/nginx-pipeline' -d@/work/pipeline.json
  71. #pipeline: "nginx-pipeline"
  72. #----------------------------- Logstash output --------------------------------
  73. #output.logstash:
  74. # The Logstash hosts
  75. #hosts: ["elk-logstash:5044"]
  76. # Optional SSL. By default is off.
  77. # List of root certificates for HTTPS server verifications
  78. #ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
  79. # Certificate for SSL client authentication
  80. #ssl.certificate: "/etc/pki/client/cert.pem"
  81. # Client Certificate Key
  82. #ssl.key: "/etc/pki/client/cert.key"
  83. #================================ Logging =====================================
  84. # Sets log level. The default log level is info.
  85. # Available log levels are: critical, error, warning, info, debug
  86. #logging.level: debug
  87. # At debug level, you can selectively enable logging only for some components.
  88. # To enable all selectors use ["*"]. Examples of other selectors are "beat",
  89. # "publish", "service".
  90. #logging.selectors: ["*"]