Created
April 11, 2020 19:41
-
-
Save VerosK/5441da34c2ee130c929a44d71d05d919 to your computer and use it in GitHub Desktop.
Filebeat in kubernetes
This file contains hidden or 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: | |
- type: container | |
paths: | |
- /var/log/containers/*.log | |
processors: | |
- add_kubernetes_metadata: | |
in_cluster: true | |
host: ${NODE_NAME} | |
matchers: | |
- logs_path: | |
logs_path: "/var/log/containers/" | |
- decode_json_fields: | |
when: | |
and: | |
- regexp: | |
message: ' *\{.*\} *' | |
- equals: | |
"kubernetes.container.name": nginx-ingress-controller | |
fields: ["message"] | |
max_depth: 1 | |
target: "" | |
overwrite_keys: true | |
add_error_key: true | |
output.elasticsearch: | |
hosts: ['elasticsearch.services:9200'] | |
protocol: http |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment