🤟 This repo for practicing ELK using Golang (Echo Framework), Docker, Circle CI and Codecov
Practicing ELK Stack Using Golang (Echo Framework) as Programming Language, ELK (Elasticsearch Logstash Kibana) as Service
Your project directory structure should look like this
+ your_gopath/
|
+--+ src/github.com/moemoe89
| |
| +--+ go-elk-hiro/
| |
| +--+ main.go
| + api/
| + routers/
| + ... any other source code
|
+--+ bin/
| |
| +-- ... executable file
|
+--+ pkg/
|
+-- ... all dependency_library required
$GOPATH
, do the following command :
$ mkdir -p src/github.com/moemoe89
$ cd src/github.com/moemoe89
$ git clone <url>
$ mv <cloned directory> go-elk-hiro
Make config file for local :
$ cp config-sample.json config.json
Build
$ go build
Run
$ go run main.go
Make config file for docker :
$ cp config-sample.json config.json
Build
$ docker-compose build
Run
$ docker-compose up
Stop
$ docker-compose down
Make some log by hit the endpoints :
$ curl localhost:8788/error
$ curl localhost:8788/info
$ curl localhost:8788/warn
Navigate kibana on your browser :
localhost:5601