Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 1.08 KB

File metadata and controls

39 lines (26 loc) · 1.08 KB

qremlin

This silly little project provides remote access to a specified list of log files. Chances are it won't ever be used, but it fills a current need in a very lightweight way and is therefore worth exploring.

Usage

qremlin -filelist=/etc/qremlin-filelist.conf -listen=0.0.0.0:64646 -bufsize=1024

All arguments are options; default values are shown above.

API

Valid URLs are:

  • /<fileId>
    Download the file.
  • /<fileId>/tail
    Tail the file. Polls once per second for changes to the file, and uses chunked encoding to send it to the client.

The first URL can take a query parameter of n which indicates the number of lines to return from the end of the file.

Both URLs can take a query parameter of q which specifies a string by which to filter the lines returned.

TODO

  • Tests and testing.
  • Support regular expression queries.
  • Websocket support for tailing.
  • Format dates into the log filenames.
  • Optionally download prepend previously rotated log files when downloading.

License

Do whatever you want with this thing. Pull requests welcome.