Created
June 20, 2019 06:41
-
-
Save songzheng45/26b9125f325f106235e0ec05ca7d5f8b to your computer and use it in GitHub Desktop.
elk filebeat config sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#=========================== 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