Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/daschr/logsqlite
Logging driver plugin for fast querying on huge logs.
https://github.com/daschr/logsqlite
database docker driver log moby plugin sqlite sqlite3
Last synced: 8 days ago
JSON representation
Logging driver plugin for fast querying on huge logs.
- Host: GitHub
- URL: https://github.com/daschr/logsqlite
- Owner: daschr
- License: mit
- Created: 2023-08-16T21:04:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-20T17:00:20.000Z (11 months ago)
- Last Synced: 2024-03-21T17:34:36.459Z (11 months ago)
- Topics: database, docker, driver, log, moby, plugin, sqlite, sqlite3
- Language: Rust
- Homepage: https://hub.docker.com/r/daschr/logsqlite
- Size: 96.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# LogSQlite
Logging driver plugin for fast querying on huge logs.Ever had to query container logs containing thousands of lines using `docker logs --since --until ` and experienced it's ridiculously long seek time?
But you don't want to setup a whole log management platform?*Then you may use this plugin!*
# Installation
Just `docker plugin install daschr/logsqlite && docker plugin enable daschr/logsqlite`# Using the driver
## with docker
`docker run --log-driver daschr/logsqlite hello-world`
## with docker-compose
```
version: "3"services:
container:
image: hello-world
logging:
driver: "daschr/logsqlite"
# the following is purely optional; the set values are the default ones
options:
# in ms, timeout value for a new log message of a message burst
message_read_timeout: "100"
# maximum number of lines a transaction of a burst can have before it gets committed
max_lines_per_tx: "10000"
# maximum size a burst of messages (which forms a transaction) can have
# before it gets committed
# use G(iga), M(ega), K(ilo) bytes
max_size_per_tx: "10M"
# the maximum age of an log entry (else it will be purged)
# comment out to not limit by age
# use w(eeks), d(ays), h(ours), m(onths), s(econds)
# cleanup_age: 30d# limit the logs by number of lines
cleanup_max_lines: "10000000"
# whether the log of the container is deleted or not (default: true)
delete_when_stopped: "true"
```# Options
See the *docker-compose* example.# Source Code
See https://github.com/daschr/logsqlite