os:CentOS release 6.5 (Final)
filebeat version:filebeat-5.6.0-1.x86_64
32 core cpu.
I have use filebeats to collect nginx logs(my log is json format) and sent to kafka. but cpu usage is too high ,but I don't know what's wrong with that。
this is my filebeat config file
filebeat.prospectors:
- input_type: log
paths:
- /data/logs/nginx/access.log
document_type: nginxAccess
tail_files: false
processors:
- decode_json_fields:
fields: ["message",]
process_array: false
max_depth: 1
target:
overwrite_keys: false
output.kafka:
hosts: ["kafa1:9092", "kafka2:9092", "kafa3:9092","kafka4:9092","kafka5:9092"]
topic: '%{[type]}'
partition.round_robin:
reachable_only: false
required_acks: 1
compression: gzip
max_message_bytes: 1000000
after I start filebeat ,I type top to monitor the usage of cpu ,it mount to 1000%+ like this
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
121961 root 20 0 143m 136m 5500 S 1129.9 0.1 108:59.94 filebeat
plz tell me how to reduce cpu usage!
I would be very grateful