https://github.com/cirocosta/oklog-docker-plugin
OKLog forwarder that sends your container logs to OKLog ingestors
https://github.com/cirocosta/oklog-docker-plugin
containers docker logging oklog plugin
Last synced: about 2 months ago
JSON representation
OKLog forwarder that sends your container logs to OKLog ingestors
- Host: GitHub
- URL: https://github.com/cirocosta/oklog-docker-plugin
- Owner: cirocosta
- Created: 2017-12-15T23:28:57.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-17T01:22:13.000Z (over 8 years ago)
- Last Synced: 2025-07-27T12:41:08.500Z (11 months ago)
- Topics: containers, docker, logging, oklog, plugin
- Language: Go
- Size: 10.8 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
oklog-docker-plugin 📝
Forwards your container logs to OKLog ingestors
`docker-oklog-driver` is a custom Docker logging plugin that implements the log driver interface and acts as an OKLog forwarder.
### Install
```sh
# Install the plugin `cirocosta/oklog-docker-plugin`
# and then make it aliased to `oklog` so that we can
# make use of it via the alias.
#
# INGESTER configures the host name to use to look
# for ingester nodes.
docker plugin install \
--alias oklog \
cirocosta/oklog-docker-plugin \
INGESTER=127.0.0.1:7651
# Run a container with `oklog` being used as the log
# plugin.
docker run \
--log-driver oklog \
alpine echo lol
# Query oklog for the the last logs stored in the last
# 1m
oklog query -from 1m
cid=f034d50a48a964cc5ef7b4dd678cc155246de8209c32a25891cfe81c9ce296fc lol
# Run a container with `oklog` as the log plugin but
# capturing the labels specified so that we can query
# against them in the future.
docker run \
--log-driver oklog \
--log-opt labels=foo \
--label foo=bar \
alpine echo lol2
# Query all the logs from the last 3min
oklog query -from 3m
cid=f034d50a48a964cc5ef7b4dd678cc155246de8209c32a25891cfe81c9ce296fc lol
cid=fcf89d4cd2a6bcb33b50cb21fe29d4245efb473e94e8b427fb252ed298434dc1 foo=bar lol2
# Query all the logs from the last 3min but only
# those that container `foo=bar`
oklog query -from 3m -q foo=bar
cid=fcf89d4cd2a6bcb33b50cb21fe29d4245efb473e94e8b427fb252ed298434dc1 foo=bar lol2
```