-
Notifications
You must be signed in to change notification settings - Fork 680
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'duplicate-logs' of https://github.com/gliderlabs/logspout…
… into duplicate-logs
- Loading branch information
Showing
7 changed files
with
71 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM iron/go:dev | ||
|
||
WORKDIR /app | ||
ADD . /app | ||
|
||
ENTRYPOINT ["./logspout"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Instructions on how to build/test your own modules. | ||
|
||
## Getting Started | ||
|
||
1. Fork this repository | ||
1. Create a new repository for your adapter | ||
1. Copy something like [raw.go](https://github.com/gliderlabs/logspout/blob/master/adapters/raw/raw.go) to get started. | ||
1. Add your module to modules.go | ||
|
||
Now build and run logspout with your adapter, replace SYSLOG with your own syslog url. | ||
|
||
```sh | ||
SYSLOG=syslog://logs.papertrailapp.com:55555 ./run-custom.sh | ||
``` | ||
|
||
Now let's add your new adapter to the running logspout (replace address below with your final stats destination): | ||
|
||
```sh | ||
curl http://localhost:8000/routes -d '{ | ||
"adapter": "myadapter", | ||
"filter_sources": ["stdout" ,"stderr"], | ||
"address": "localhost:1234" | ||
}' | ||
``` | ||
|
||
Now any log messages that come out of any container on your machine will go through your adapter. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
set -ex | ||
|
||
docker run --rm -v "$GOPATH":/go -w /go/src/github.com/gliderlabs/logspout -e "GOPATH=/go" iron/go:dev sh -c 'go build -o logspout' | ||
|
||
# Can build the image too | ||
# docker build -t gliderlabs/logspout:latest . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
set -ex | ||
|
||
./build-custom.sh | ||
docker build --file Dockerfile.custom -t mylogspouter . | ||
docker run --rm --name=logspout \ | ||
-v=/var/run/docker.sock:/var/run/docker.sock \ | ||
-p 8000:80 \ | ||
mylogspouter \ | ||
${SYSLOG} |