https://github.com/dmportella/docker-beat
A simple docker event beat server that will distribute docker events to plugins/actors to perform actions against them.
https://github.com/dmportella/docker-beat
actors containers docker docker-api docker-beat docker-events events golang kubernetes rancher volume
Last synced: 25 days ago
JSON representation
A simple docker event beat server that will distribute docker events to plugins/actors to perform actions against them.
- Host: GitHub
- URL: https://github.com/dmportella/docker-beat
- Owner: dmportella
- License: apache-2.0
- Created: 2016-11-18T15:17:35.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-26T10:47:19.000Z (about 9 years ago)
- Last Synced: 2025-06-15T04:46:18.165Z (12 months ago)
- Topics: actors, containers, docker, docker-api, docker-beat, docker-events, events, golang, kubernetes, rancher, volume
- Language: Go
- Homepage:
- Size: 2.46 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docker-beat
A simple docker event beat server that will distribute docker events to plugins/actors to perform actions against them.
@dmportella
[](https://raw.githubusercontent.com/dmportella/docker-beat/master/LICENSE) [](https://travis-ci.org/dmportella/docker-beat) [](https://godoc.org/github.com/dmportella/docker-beat) [](https://goreportcard.com/report/github.com/dmportella/docker-beat) [](https://github.com/dmportella/docker-beat/releases)
## Dockerhub
[](https://hub.docker.com/r/dmportella/docker-beat/)
### Supported tags and respective `Dockerfile` files
* [`0.0.6`, `latest` (scratch/dockerfile)](https://github.com/dmportella/docker-beat/blob/0.0.6/dockerfile)
* [`0.0.5`, (scratch/dockerfile)](https://github.com/dmportella/docker-beat/blob/0.0.5/dockerfile)
* [`0.0.3`, (scratch/dockerfile)](https://github.com/dmportella/docker-beat/blob/0.0.3/dockerfile)
* [`0.0.2`, (scratch/dockerfile)](https://github.com/dmportella/docker-beat/blob/0.0.2/dockerfile)
## Current support
Currently `docker-beat` supports sending docker events to the following endpoints.
- console
- rabbitmq
- webhook
- websockets
See projects for future endpoints support and additional things on the roadmap.
## Running in Docker
The docker container supports Docker API Socket as a volume (not recommended) or you can provide the Docker API Url.
### Running docker-beat with Docker API as Socket Volume
> $ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock dmportella/docker-beat --consumer webhook --webhook-endpoint http://requestb.in/rn7cixrn
### Running docker-beat with Docker API as Endpoint
> $ docker run --rm dmportella/docker-beat --consumer webhook --docker-endpoint "tcp://localhost:2375" --webhook-endpoint http://requestb.in/rn7cixrn
## Running locally
Should be simple to run the application locally it differs just slightly between OS.
```
docker-beat - Version: 0.0.6 Branch: master Revision: 5b8fa31. OSArch: linux/amd64.
Daniel Portella (c) 2016
Usage of ./bin/docker-beat:
-consumer string
Consumer to use: Webhook, Rabbitmq, etc. (default "console")
-docker-endpoint string
The Url or unix socket address for the Docker Remote API. (default "unix:///var/run/docker.sock")
-help
Prints the help information.
-indent
Indent the json output.
-rabbitmq-endpoint string
rabbitmq: The URL that events will be published too. (default "amqp://guest:guest@localhost:5672/")
-rabbitmq-exchange string
rabbitmq: The exchange docker-beat will publish messages too. (default "docker-beat")
-rabbitmq-exchange-type string
rabbitmq: The exchange type that docker-beat will create/connect too. (direct|fanout|topic|x-custom) (default "fanout")
-rabbitmq-reliable
rabbitmq: The ensures messages published are confirmed.
-rabbitmq-routing-key string
rabbitmq: The routing key for messages published to the exchange. (default: docker-event (default "docker-event")
-verbose
Redirect trace information to the standard out.
-webhook-endpoint string
webhook: The URL that events will be POSTed too.
-webhook-skip-ssl-verify
webhook: Tells docker-beat to ignore ssl verification for the endpoint (not recommented).
-websocket-endpoint string
websocket: The URL that events will be streamed too.
-websocket-origin string
websocket: The origin of the request to be used in the web socket stream.
-websocket-protocol string
websocket: The protocol to be used in the web socket stream.
```
### Linux, Darwin and FreeBSD
> ./docker-beat --consumer webhook --webhook-endpoint http://requestb.in/rn7cixrn
### Windows
> .\docker-beat --consumer webhook --docker-endpoint "tcp://localhost:2375" --webhook-endpoint http://requestb.in/rn7cixrn