Skip to content

Commit

Permalink
Expose flush_time_count and slow_flush_count metrics
Browse files Browse the repository at this point in the history
Signed-off-by: Vlad Gorodetsky <v@gor.io>
  • Loading branch information
bai committed Jun 21, 2019
1 parent 050c47a commit fbb205c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/fluent/plugin/in_prometheus_output_monitor.rb
Expand Up @@ -24,6 +24,10 @@ class PrometheusOutputMonitorInput < Fluent::Input
:emit_records,
:write_count,
:rollback_count,

# from v1.5.3
:flush_time_count,
:slow_flush_count,
]

def initialize
Expand Down Expand Up @@ -84,6 +88,12 @@ def start
rollback_count: @registry.gauge(
:fluentd_output_status_rollback_count,
'Current rollback counts.'),
flush_time_count: @registry.gauge(
:fluentd_output_status_flush_time_count,
'Total flush time.'),
slow_flush_count: @registry.gauge(
:fluentd_output_status_slow_flush_count,
'Current slow flush counts.'),
retry_wait: @registry.gauge(
:fluentd_output_status_retry_wait,
'Current retry wait'),
Expand Down Expand Up @@ -112,6 +122,8 @@ def update_monitor_info
emit_count: @metrics[:emit_count],
emit_records: @metrics[:emit_records],
rollback_count: @metrics[:rollback_count],
flush_time_count: @metrics[:flush_time_count],
slow_flush_count: @metrics[:slow_flush_count],
}

agent_info.each do |info|
Expand Down

0 comments on commit fbb205c

Please sign in to comment.