Browse Source

Added Documentation

pull/977/head
jmanuelcorral 5 years ago
parent
commit
8d7d27cc91
6 changed files with 28 additions and 1 deletions
  1. +28
    -0
      elk/Readme.md
  2. BIN
      img/elk/kibana_eshops_index.png
  3. BIN
      img/elk/kibana_result.png
  4. BIN
      img/elk/kibana_startup.png
  5. BIN
      img/elk/kibana_working.png
  6. +0
    -1
      k8s/helm/elk/installelk.ps1

+ 28
- 0
elk/Readme.md View File

@ -0,0 +1,28 @@
This article contains a brief introduction to centralized structured logging with [Serilog](https://serilog.net/) and event viewing with [ELK](https://www.elastic.co/elk-stack) in eShopOnContainers. ELK is an acronym of ElasticSearch, LogStash and Kibana. This is one of the most used tools in the industry standards.
![](img/elk/kibana-working.png)
## Wiring eshopOnContainers with ELK
eshopOnContainers is ready for work with ELK, you only need to setup the configuration parameter **LogstashgUrl**, in **Serilog** Section, for achieve this, you can do it modifing this parameter in every appsettings.json in every service, or via Environment Variable **Serilog:LogstashUrl**.
There is another option, a zero-configuration environment for testing the integration launching via ```docker-compose``` command, on the root directory of eshopOnContainers:
```sh
docker-compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.elk.yml
```
### Configuring Logstash index on Kibana
Once time you have started and configured your application, you only need to configure the logstash index on kibana.
You can address to Kibana, with docker-compose setup is at [http://localhost:5601](http://localhost:5601)
If you have accessed to kibana too early, you can see this error. It's normal, depending of your machine the kibana stack needs a bit of time to startup.
![](img/elk/kibana_startup.png)
You can wait a bit and refresh the page, the first time you enter, you need to configure and index pattern, in the ```docker-compose``` configuration, the index pattern name is **eshops-\***.
![](img/elk/kibana_eshops_index.png)
With the index pattern configured, you can enter in the discover section and start viewing how the tool is recollecting the logging information.
![](img/elk/kibana_result.png)

BIN
img/elk/kibana_eshops_index.png View File

Before After
Width: 1157  |  Height: 727  |  Size: 37 KiB

BIN
img/elk/kibana_result.png View File

Before After
Width: 1156  |  Height: 726  |  Size: 71 KiB

BIN
img/elk/kibana_startup.png View File

Before After
Width: 1157  |  Height: 729  |  Size: 57 KiB

BIN
img/elk/kibana_working.png View File

Before After
Width: 1157  |  Height: 542  |  Size: 78 KiB

+ 0
- 1
k8s/helm/elk/installelk.ps1 View File

@ -1 +0,0 @@
helm install --name elk stable/elastic-stack --namespace elk

Loading…
Cancel
Save