The document says output_status_retry_wait means current retry_wait computed from last retry time and next retry time.
|
- `fluentd_output_status_retry_wait` |
|
- current retry_wait computed from last retry time and next retry time |
However, it actually means the elapsed time from the first retry.
We need to fix the value or the document.
|
if info['retry'] |
|
next_time = info['retry']['next_time'] |
|
start_time = info['retry']['start'] |
|
if start_time.nil? && info['instance_variables'] |
|
# v0.12 does not include start, use last_retry_time instead |
|
start_time = info['instance_variables'][:last_retry_time] |
|
end |
|
|
|
wait = 0 |
|
if next_time && start_time |
|
wait = next_time - start_time |
|
end |
|
@metrics[:retry_wait].set(wait.to_f, labels: label) |
|
end |
It is calculated as next_time - start.
start is the time of the first retry, so this value means the elapsed time from the first retry.
The document says
output_status_retry_waitmeans current retry_wait computed from last retry time and next retry time.fluent-plugin-prometheus/README.md
Lines 122 to 123 in 41fa2df
However, it actually means the elapsed time from the first retry.
We need to fix the value or the document.
fluent-plugin-prometheus/lib/fluent/plugin/in_prometheus_output_monitor.rb
Lines 194 to 207 in 41fa2df
It is calculated as
next_time-start.startis the time of the first retry, so this value means the elapsed time from the first retry.