Skip to content

Buffer metric available_buffer_space_ratios is always 100 % #2857

@clook

Description

@clook

The metric available_buffer_space_ratios from buffer plugin is always at 100 % because of misusage of the round function.

It is computed through the following code https://github.com/fluent/fluentd/pull/2450/files#diff-7d794f77abc9222413b9120533cff327R745
with an integer round (no ndigits given defaults to 0).

Hence, the ratio of used buffer ((@stage_size + @queue_size * 1.0) / @total_limit_size).round is always equals to 0 and available one is always 1.

The round should take a decent ndigits argument such as 2 for an integer percent ratio or 3 for 1 digit after decimal point.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions