Skip to content

Instantly share code, notes, and snippets.

@songzheng45
Created June 20, 2019 06:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save songzheng45/26b9125f325f106235e0ec05ca7d5f8b to your computer and use it in GitHub Desktop.
Save songzheng45/26b9125f325f106235e0ec05ca7d5f8b to your computer and use it in GitHub Desktop.
elk filebeat config sample
#=========================== Filebeat inputs =============================
filebeat.inputs:
- type: log
enabled: true
fields:
_recharge_api: true
paths:
- /opt/webroot/recharge-api/log/info/*.log
- /opt/webroot/recharge-api/log/error/*.log
- /opt/webroot/recharge-api/log/warn/*.log
exclude_lines: ['^------------', '^Message.+', '^Received.+']
multiline.pattern: ^[-]{10,}
multiline.negate: true
multiline.match: after
- type: log
enabled: true
fields:
_recharge_customer: true
paths:
- /opt/webroot/recharge-customer/log/**
exclude_lines: ['^------------']
multiline.pattern: ^[-]{10,}
multiline.negate: true
multiline.match: after
fields_under_root: true
#============================= Filebeat modules ===============================
filebeat.config.modules:
# Glob pattern for configuration loading
path: ${path.config}/modules.d/*.yml
# Set to true to enable config reloading
reload.enabled: false
setup.template.settings:
index.number_of_shards: 1
#index.codec: best_compression
#_source.enabled: false
#================================ Outputs =====================================
#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["localhost:9200"]
# index: "zhongbo-recharge-%{+yyyy.MM.dd}"
# Optional protocol and basic auth credentials.
#protocol: "https"
username: "elastic"
password: "changeme"
#----------------------------- Logstash output --------------------------------
#output.logstash:
# The Logstash hosts
#hosts: ["localhost:5044"]
# Optional SSL. By default is off.
# List of root certificates for HTTPS server verifications
#ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
# Certificate for SSL client authentication
#ssl.certificate: "/etc/pki/client/cert.pem"
# Client Certificate Key
#ssl.key: "/etc/pki/client/cert.key"
#================================ Processors =====================================
# Configure processors to enhance or manipulate events generated by the beat.
processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment