go-elk-hiro

command module
v0.0.0-...-8cb2eef Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2020 License: MIT Imports: 3 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL