Skip to content
Snippets Groups Projects
  1. Feb 01, 2019
    • Anthony Woods's avatar
      handle symbolic links correctly (#275) · df843647
      Anthony Woods authored
      * handle symbolic links correctly
      
      When tailing a file that is rotated we expect that a fsnotify.Rename
      event will be sent when the old file is renamed and a fsnotif.Create
      event will be sent when the replacement file is created. This allows
      us to close and re-open the file.  However if the file we are
      tailing is a symbolic link (and the target is in another directory)
      we wont get these events.  To address this we need to tail the target
      file directly.
      
      fixes #274
      
      * handle symlinks being re-linked
      
      When a symbolic link is re-linked we will only get a fsnotify.Create
      event. No rename or delete event will have been sent to trigger
      the tailer to be stoped.  When this happens we should stop the current
      tailer for the path and start a new one. This will allow us to perform
      a new Readink on the path to get the updated target filename.
      df843647
    • Goutham Veeramachaneni's avatar
      Flush idle chunks properly (#209) · 7763e8f3
      Goutham Veeramachaneni authored
      
      * Flush idle chunks properly
      
      Signed-off-by: default avatarGoutham Veeramachaneni <gouthamve@gmail.com>
      
      * Review feedback
      
      Signed-off-by: default avatarGoutham Veeramachaneni <gouthamve@gmail.com>
      
      * Review feedback.
      
      Signed-off-by: default avatarTom Wilkie <tom.wilkie@gmail.com>
      
      * Check the correct chunk is full before appending a new chunk.
      
      Signed-off-by: default avatarTom Wilkie <tom.wilkie@gmail.com>
      
      * Add the config to helm and ksonnet too.
      
      Signed-off-by: default avatarTom Wilkie <tom.wilkie@gmail.com>
      7763e8f3
  2. Jan 31, 2019
  3. Jan 29, 2019
    • Ed's avatar
      removing incorrect calling of positions.Stop from within a target as it runs... · 3e6a75e1
      Ed authored
      removing incorrect calling of positions.Stop from within a target as it runs single instance within promtail, moved the call to Stop up to promtail.go within the Shutdown() method.  Should Fix #249 (#252)
      
      3e6a75e1
    • Ed's avatar
      Unit tests for Promtail (#244) · 07f20b0d
      Ed authored
      * Adding a test for target.go
      Fixing some shutdown issues where tailers were stopped but didn't properly wait for the current position to be saved to file
      Fixed an issue where an empty directory would lead to nothing being tailed
      
      * adding more tests for target.go
      
      * renaming quitComplete -> done per feedback
      making PositionsFile private again, no reason for it to be public
      removed unnecessary save of empty file on creation of positions file
      
      * fixing lint errors
      
      * cleaning up some comments
      removing TODO around directories, added a test to verify behavior
      some more cleanup per review
      
      * fixing imports
      07f20b0d
  4. Jan 17, 2019
    • Anthony Woods's avatar
      allow promtail path to be a glob match (#206) · fed39435
      Anthony Woods authored
      * allow promtail target path to be a glob match
      
      Promtail now expects __path__ to be a glob. All files that match
      the glob expression will be tailed.  If new files are created that
      match the glob, they will immediately be tailed.
      
      * remove entry from positions file when file is deleted
      
      * fix syncing the current positions to positions file
      
      * handle file renames
      
      When a file is renamed a "rename" and a "create" event are sent.
      We need to treat the rename as a remove.  If the new filename matches
      the path glob, then we will start tailing it when the "create" event
      is reveived.
      
      * lint
      fed39435
  5. Jan 14, 2019
  6. Jan 11, 2019
  7. Dec 19, 2018
  8. Dec 18, 2018
  9. Dec 17, 2018
  10. Dec 16, 2018
  11. Dec 14, 2018
  12. Dec 12, 2018
  13. Dec 10, 2018
  14. Dec 05, 2018
  15. Dec 04, 2018
  16. Nov 25, 2018
  17. Nov 24, 2018
  18. Nov 22, 2018
  19. Nov 20, 2018
  20. Nov 19, 2018
  21. Jul 09, 2018
  22. Jul 04, 2018
Loading