diff --git a/lib/fluent/plugin/in_tail.rb b/lib/fluent/plugin/in_tail.rb index fb29dd249f..ef2f6b6c77 100644 --- a/lib/fluent/plugin/in_tail.rb +++ b/lib/fluent/plugin/in_tail.rb @@ -778,7 +778,7 @@ def initialize(target_info, pe, log, read_from_head, follow_inodes, update_watch attr_accessor :group_watcher def tag - @parsed_tag ||= @path.tr('/', '.').gsub(/\.+/, '.').gsub(/^\./, '') + @parsed_tag ||= @path.tr('/', '.').squeeze('.').gsub(/^\./, '') end def register_watcher(watcher)