Skip to content

Commit

Permalink
Merging with changes for comments
Browse files Browse the repository at this point in the history
Signed-off-by: Athish Pranav D <athishanna@gmail.com>
  • Loading branch information
Athishpranav2003 committed Aug 8, 2024
1 parent e4cfd6f commit 5fc1132
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ This plugin uses internal class of Fluentd, so it's easy to break.
- `fluentd_tail_file_closed`: Number of closed files
- `fluentd_tail_file_opened`: Number of opened files
- `fluentd_tail_file_rotated`: Number of rotated files
- `fluentd_tail_file_throttled`: Number of throttled files
- `fluentd_tail_file_throttled`: Number of times files got throttled (only with fluentd version > 1.17)

Default labels:

Expand Down
4 changes: 2 additions & 2 deletions lib/fluent/plugin/in_prometheus_tail_monitor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def start
'Number of files rotated.'),
throttled_file_metrics: get_gauge(
:fluentd_tail_file_throttled,
'Number of files throttled.'),
'Number of times files got throttled.'),
}
timer_execute(:in_prometheus_tail_monitor, @interval, &method(:update_monitor_info))
end
Expand Down Expand Up @@ -92,7 +92,7 @@ def update_monitor_info
@metrics[:closed_file_metrics].set(monitor_info.closed.get, labels: label)
@metrics[:opened_file_metrics].set(monitor_info.opened.get, labels: label)
@metrics[:rotated_file_metrics].set(monitor_info.rotated.get, labels: label)
@metrics[:throttled_file_metrics].set(monitor_info.throttled.get, labels: label)
@metrics[:throttled_file_metrics].set(monitor_info.throttled.get, labels: label) if monitor_info.members.include?(:throttled)
end
end
end
Expand Down

0 comments on commit 5fc1132

Please sign in to comment.