In this repo you can find example how to work with Elasticsearch and Go together
- Golang 1.11
- Go Mod for Golang vendor
- olivere/elastic.v5 library
- Elasticsearch v6.5.1
- Kibana v6.5.1
- Docker and docker-compose for running
- Run ElasticSearch
- Run Kibana
- Configurate Kibana dashboards
- Go application create index in Elasticsearch for test data
- Go application send data to Elasticsearch with random numbers by random users
- Go application select data by user name Pavel (search example) and print it in console logs
- Clone project:
go get github.com/pcherednichenko/goek
- Open to project folder:
cd $GOPATH/src/github.com/pcherednichenko/goek/
- Run services:
docker-compose up -d
- Open http://localhost:5601/app/kibana#/dashboard/065f0890-ef00-11e8-b390-110dd8eed153 to see dashboard data
You can also see result of go applications with command:
docker-compose logs -f golang