Code Monkey home page Code Monkey logo

Comments (10)

kzk avatar kzk commented on May 12, 2024

Could you give me a pointer of Scribe's document? Will take a look at it.

from fluentd.

aknapp avatar aknapp commented on May 12, 2024

So, Scribe's documentation is notoriously bad, and this is all I could find:
https://github.com/facebook/scribe/wiki/Scribe-Configuration

About halfway down, there is this blurb:

create_symlink: β€œyes” or anything else; β€œyes” by default

if true, will maintain a symlink that points to the most recently written file

So, in the log file directory for 'test_log', there is always a 'test_log_current' that points to the log file that is currently being written to. When the file is rotated, you just change the link (and this allows tail -F to work on the 'test_log_current' file).

from fluentd.

kzk avatar kzk commented on May 12, 2024

OK I understand.

We also might want to have modified version of out_file, just adding recent entries to the files instead of slicing logs by time_slice_format.

from fluentd.

aknapp avatar aknapp commented on May 12, 2024

Any update on this?

from fluentd.

aknapp avatar aknapp commented on May 12, 2024

Pinging this issue again.

from fluentd.

repeatedly avatar repeatedly commented on May 12, 2024

I'm not sure about the detail behavior of Scribe.

In fluentd, my implementation idea is simple:

  1. out_file writes chunk to file.
  2. after wrote the file, re-link symlink to written file.

iterates above operations for nomarl file and gz file.
Is it enough?

from fluentd.

aknapp avatar aknapp commented on May 12, 2024

Yeah, I think that will totally work. Will you re-link the symlink right after switching what file you are writing to?

For instance, the reason we want this is for displaying logs in our office.

from fluentd.

repeatedly avatar repeatedly commented on May 12, 2024

^ is first implementation.
out_file doesn't provide non buffered mode, so out_file can't implement Scribe like each event tailing.

If you set symlink_path in out_file, out_file plugin creates symlink with suffix to point to latest file.
We can use tail -F to watch written logs.

from fluentd.

aknapp avatar aknapp commented on May 12, 2024

Perfect! Thanks :)

from fluentd.

aknapp avatar aknapp commented on May 12, 2024

Sorry to reopen this:

I just installed the newest td-agent package, and the way this works seems not that useful.

Right now, the symlink_path file is symlinked to the last fully written file, not the file that's currently being written. For instance, in our nginx access log directory:

last fully written log: access.log.2013080820_1.log
current file being written to: access.log.2013080821.b4e375f0fb757453e

The symlink access.log_current is currently pointing to access.log.2013080820_1.log, when I would expect it to be pointing to access.log.2013080821.b4e375f0fb757453e. Am I missing something?

from fluentd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.