filebeat.yml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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. ### Multiline options
  36. # Mutiline can be used for log messages spanning multiple lines. This is common
  37. # for Java Stack Traces or C-Line Continuation
  38. # The regexp Pattern that has to be matched. The example pattern matches all lines starting with [
  39. #multiline.pattern: ^\[
  40. # Defines if the pattern set under pattern should be negated or not. Default is false.
  41. #multiline.negate: false
  42. # Match can be set to "after" or "before". It is used to define if lines should be append to a pattern
  43. # that was (not) matched before or after or as long as a pattern is not matched based on negate.
  44. # Note: After is the equivalent to previous and before is the equivalent to to next in Logstash
  45. #multiline.match: after
  46. #================================ General =====================================
  47. # The name of the shipper that publishes the network data. It can be used to group
  48. # all the transactions sent by a single shipper in the web interface.
  49. #name:
  50. # The tags of the shipper are included in their own field with each
  51. # transaction published.
  52. #tags: ["service-X", "web-tier"]
  53. # Optional fields that you can specify to add additional information to the
  54. # output.
  55. #fields:
  56. # env: staging
  57. #================================ Outputs =====================================
  58. # Configure what outputs to use when sending the data collected by the beat.
  59. # Multiple outputs may be used.
  60. #-------------------------- Elasticsearch output ------------------------------
  61. output.elasticsearch:
  62. # Array of hosts to connect to.
  63. hosts: ["elk-es:9200"]
  64. # Optional protocol and basic auth credentials.
  65. #protocol: "https"
  66. username: "elastic"
  67. password: "changeme"
  68. #index: "nginx-%{+yyyy.MM.dd}"
  69. #curl -XPUT 'http://elk-ek:9200/_ingest/pipeline/nginx-pipeline' -d@/work/pipeline.json
  70. #pipeline: "nginx-pipeline"
  71. #----------------------------- Logstash output --------------------------------
  72. #output.logstash:
  73. # The Logstash hosts
  74. #hosts: ["elk-logstash:5044"]
  75. # Optional SSL. By default is off.
  76. # List of root certificates for HTTPS server verifications
  77. #ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
  78. # Certificate for SSL client authentication
  79. #ssl.certificate: "/etc/pki/client/cert.pem"
  80. # Client Certificate Key
  81. #ssl.key: "/etc/pki/client/cert.key"
  82. #================================ Logging =====================================
  83. # Sets log level. The default log level is info.
  84. # Available log levels are: critical, error, warning, info, debug
  85. #logging.level: debug
  86. # At debug level, you can selectively enable logging only for some components.
  87. # To enable all selectors use ["*"]. Examples of other selectors are "beat",
  88. # "publish", "service".
  89. #logging.selectors: ["*"]