Advertisement
Guest User

Filebeat conf

a guest
Oct 26th, 2015
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 9.05 KB | None | 0 0
  1. ################### Filebeat Configuration Example #########################
  2.  
  3. ############################# Filebeat ######################################
  4. filebeat:
  5.  # List of prospectors to fetch data.
  6.   prospectors:
  7.    # Each - is a prospector. Below are the prospector specific configurations
  8.     -
  9.       # Paths that should be crawled and fetched. Glob based paths.
  10.       # To fetch all ".log" files from a specific level of subdirectories
  11.       # /var/log/*/*.log can be used.
  12.       # For each file found under this path, a harvester is started.
  13.       # Make sure not file is defined twice as this can lead to unexpected behaviour.
  14.       paths:
  15.      # - /var/log/*.log
  16.         - c:\Logs\API_Logs\*\*.log
  17.       #  - c:\Logs\Service_Logs\*
  18.  
  19.       # Configure the file encoding for reading file with international characters
  20.       # supported encodings:
  21.       #   plain, utf-8, utf-16be-bom, utf-16be, utf-16le, big5, gb18030, gbk, hzgb2312,
  22.       #   euckr, eucjp, iso2022jp, shiftjis, iso8859-63, iso8859-6i, iso8859-8e,
  23.       #   iso8859-8i
  24.       encoding: plain
  25.  
  26.       # Type of the files. Based on this the way the file is read is decided.
  27.       # The different types cannot be mixed in one prospector
  28.       #
  29.       # Possible options are:
  30.       # * log: Reads every line of the log file (default)
  31.       # * stdin: Reads the standard in
  32.       type: log
  33.  
  34.       # Optional additional fields. These field can be freely picked
  35.       # to add additional information to the crawled log files for filtering
  36.       #fields:
  37.       #  level: debug
  38.       #  review: 1
  39.  
  40.       # Ignore files which were modified more then the defined timespan in the past
  41.       # Time strings like 2h (2 hours), 5m (5 minutes) can be used.
  42.       #ignore_older:
  43.  
  44.       # Scan frequency in seconds.
  45.       # How often these files should be checked for changes. In case it is set
  46.       # to 0s, it is done as often as possible. Default: 10s
  47.       #scan_frequency: 10s
  48.  
  49.       # Defines the buffer size every harvester uses when fetching the file
  50.       #harvester_buffer_size: 16384
  51.  
  52.       # Always tail on log rotation. Disabled by default
  53.       # Note: This may skip entries
  54.       #tail_on_rotate: false
  55.  
  56.     #-
  57.     #  paths:
  58.     #    - /var/log/apache/*.log
  59.     #  type: log
  60.     #
  61.     #  # Ignore files which are older then 24 hours
  62.     #  ignore_older: 24h
  63.     #
  64.     #  # Additional fields which can be freely defined
  65.     #  fields:
  66.     #    type: apache
  67.     #    server: localhost
  68.     #-
  69.     #  type: stdin
  70.     #  paths:
  71.     #    - "-"
  72.  
  73.   # General filebeat configuration options
  74.   #
  75.   # Event count spool threshold - forces network flush if exceeded
  76.   #spool_size: 1024
  77.  
  78.   # Defines how often the spooler is flushed. After idle_timeout the spooler is
  79.   # Flush even though spool_size is not reached.
  80.   #idle_timeout: 5s
  81.  
  82.   # Name of the registry file. Per default it is put in the current working
  83.   # directory. In case the working directory is changed after when running
  84.   # filebeat again, indexing starts from the beginning again.
  85.   registry_file: "C:/ProgramData/filebeat/registry"
  86.  
  87.   # Full Path to directory with additional prospector configuration files. Each file must end with .yml
  88.   # These config files must have the full filebeat config part inside, but only
  89.   # the prospector part is processed. All global options like spool_size are ignored.
  90.   # The config_dir MUST point to a different directory then where the main filebeat config file is in.
  91.   config_dir:
  92.  
  93. ############################# Output ##########################################
  94.  
  95. # Configure what outputs to use when sending the data collected by filebeat.
  96. # You can enable one or multiple outputs by setting enabled option to true.
  97. output:
  98.   ### Elasticsearch as output
  99.   #elasticsearch:
  100.  
  101.     # Set to true to enable elasticsearch output
  102.     #enabled: false
  103.  
  104.     # Array of hosts to connect to.
  105.     # Scheme and port can be left out and will be set to the default (http and 9200)
  106.     # In case you specify and additional path, the scheme is required: http://localhost:9200/path
  107.     # IPv6 addresses should always be defined as: https://[2001:db8::1]:9200
  108.     #hosts: ["localhost:9200"]
  109.  
  110.     # Optional protocol and basic auth credentials. These are deprectad
  111.     #protocol: "https"
  112.     #username: "admin"
  113.     #password: "s3cr3t"
  114.  
  115.     # Optional index name. The default is "filebeat" and generates
  116.     # [filebeat-]YYYY.MM.DD keys.
  117.     #index: "filebeat"
  118.  
  119.     # Optional HTTP Path
  120.     #path: "/elasticsearch"
  121.  
  122.     # The number of times a particular Elasticsearch index operation is attempted. If
  123.     # the indexing operation doesn't succeed after this many retries, the events are
  124.     # dropped. The default is 3.
  125.     #max_retries: 3
  126.  
  127.     # The maximum number of events to bulk in a single Elasticsearch bulk API index request.
  128.     # The default is 10000.
  129.     #bulk_max_size: 10000
  130.  
  131.     # The number of seconds to wait for new events between two bulk API index requests.
  132.     # If `bulk_max_size` is reached before this interval expires, addition bulk index
  133.     # requests are made.
  134.     #flush_interval
  135.  
  136.     # tls configuration
  137.     #tls:
  138.       # If disabled is set to true, the tls section will be ignored and the
  139.       # host its certificate authorities will be used.
  140.       #disabled: true
  141.  
  142.       # List of root certificates for HTTPS server verifications
  143.       #certificate_authorities: ["/etc/pki/root/ca.pem"]
  144.  
  145.       # Certificate for TLS client authentication
  146.       #certificate: "/etc/pki/client/cert.pem"
  147.  
  148.       # Client Certificate Key
  149.       #certificate_key: "/etc/pki/client/cert.key"
  150.  
  151.       # Controls whether the client verifies server certificates and host name.
  152.       # If insecure is set to true, all server host names and certificates will be
  153.       # accepted. In this mode TLS based connections are susceptible to
  154.       # man-in-the-middle attacks. Use only for testing.
  155.       #insecure: true
  156.  
  157.       # Configure cipher suites to be used for TLS connections
  158.       #cipher_suites: []
  159.  
  160.       # Configure curve types for ECDHE based cipher suites
  161.       #curve_types: []
  162.  
  163.  
  164.   ### Logstash as output
  165.   logstash:
  166.    # Uncomment out this option if you want to output to Logstash. The default is false.
  167.     enabled: true
  168.  
  169.     # The Logstash hosts
  170.     hosts: ["localhost:5544"]
  171.  
  172.     # Optional load balance the events between the Logstash hosts
  173.     #loadbalance: true
  174.  
  175.     # Optional index name. The default index name is filebeat.
  176.     index: api
  177.  
  178.     # Optional TLS. The default is on
  179.     tls:
  180.       disabled: true
  181.  
  182.       # List of root certificates for HTTPS server verifications
  183.       #certificate_authorities: ["/etc/pki/root/ca.pem"]
  184.  
  185.       # Certificate for TLS client authentication
  186.       #certificate: "/etc/pki/client/cert.pem"
  187.  
  188.       # Client Certificate Key
  189.       #certificate_key: "/etc/pki/client/cert.key"
  190.  
  191.       # Controls whether the client verifies server certificates and host name.
  192.       # If insecure is set to true, all server host names and certificates will be
  193.       # accepted. In this mode TLS based connections are susceptible to
  194.       # man-in-the-middle attacks. Use only for testing.
  195.       #insecure: true
  196.  
  197.       # Configure cipher suites to be used for TLS connections
  198.       #cipher_suites: []
  199.  
  200.       # Configure curve types for ECDHE based cipher suites
  201.       #curve_types: []
  202.  
  203.  
  204.   ### File as output
  205.   #file:
  206.     # Enabling file output
  207.     #enabled: false
  208.  
  209.     # Path to the directory where to save the generated files. The option is mandatory.
  210.     #path: "/tmp/filebeat"
  211.  
  212.     # Name of the generated files. The default is `filebeat` and it generates
  213.     # files: `filebeat`, `filebeat.1`, `filebeat.2`, etc.
  214.     #filename: filebeat
  215.  
  216.     # Maximum size in kilobytes of each file. When this size is reached, the files are
  217.     # rotated. The default value is 10 MB.
  218.     #rotate_every_kb: 10000
  219.  
  220.     # Maximum number of files under path. When this number of files is reached, the
  221.     # oldest file is deleted and the rest are shifted from last to first. The default
  222.     # is 7 files.
  223.     #number_of_files: 7
  224.  
  225.  
  226. ############################# Shipper #########################################
  227.  
  228. shipper:
  229.  # The name of the shipper that publishes the network data. It can be used to group
  230.   # all the transactions sent by a single shipper in the web interface.
  231.   # If this options is not defined, the hostname is used.
  232.   #name:
  233.  
  234.   # The tags of the shipper are included in their own field with each
  235.   # transaction published. Tags make it easy to group servers by different
  236.   # logical properties.
  237.   #tags: ["service-X", "web-tier"]
  238.  
  239.   # Uncomment the following if you want to ignore transactions created
  240.   # by the server on which the shipper is installed. This option is useful
  241.   # to remove duplicates if shippers are installed on multiple servers.
  242.   #ignore_outgoing: true
  243.  
  244.  
  245. ############################# Logging #########################################
  246.  
  247. #logging:
  248. #  selectors: []
  249. #
  250. #  # Rotator config
  251. #  files:
  252. #    path:
  253. #    name:
  254. #    rotateEveryBytes:
  255. #    keepFiles:
  256. #  to_syslog: false
  257. #  to_files: false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement