Skip to content

moemoe89/go-elk-hiro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CircleCI codecov Go Report Card

GO-ELK-HIRO

Practicing ELK Stack Using Golang (Echo Framework) as Programming Language, ELK (Elasticsearch Logstash Kibana) as Service

Directory structure

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

Setup and Build

$ mkdir -p src/github.com/moemoe89
$ cd src/github.com/moemoe89
$ git clone <url>
$ mv <cloned directory> go-elk-hiro

Running Application

Make config file for local :

$ cp config-sample.json config.json

Build

$ go build

Run

$ go run main.go

How to Run with Docker

Make config file for docker :

$ cp config-sample.json config.json

Build

$ docker-compose build

Run

$ docker-compose up

Stop

$ docker-compose down

How to Test the Log

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

About

🤟 This repo for practicing ELK using Golang (Echo Framework), Docker, Circle CI and Codecov

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published