Closed tma-prismo closed 3 years ago
It can be reproducible during waiting next.
fluentd (1.12.0) fluent-plugin-cloudwatch-logs (0.13.3)
% cat fluent.in.conf
<system>
log_level debug
</system>
<source>
@type cloudwatch_logs
region "#{ENV['AWS_REGION']}"
aws_key_id "#{ENV['AWS_ACCESS_KEY_ID']}"
aws_sec_key "#{ENV['AWS_SECRET_ACCESS_KEY']}"
log_group_name test-group
log_stream_name foobar
tag cloud.in
</source>
<match>
@type stdout
</match>
set proper log_group_name and log_stream_name on your environment.
@tma-prismo
Thanks, I could send PR. #224
I'd released @kenhys's patch as v0.13.4. Thanks for the report! :+1:
Problem
high cpu usage between cloudwatch fetch ...
Steps to replicate
use top to check cpu, the ruby's cpu is close to 100% even when its not fetching from cloudwatch
Provide example config and message
Expected Behavior or What you need to ask
seems the "sleep 1" function in the "run" function in the in_cloudwatch_logs.rb need to be moved from the "if Time.now > @next_fetch_time" scope to the "until @finished" scope? otherwise the until loop is busy wait before the next fetch ...
Using Fluentd and CloudWatchLogs plugin versions
fluentd --version
ortd-agent --version
fluent-gem list
,td-agent-gem list
or your Gemfile.lock