Posts

Showing posts from February, 2024

.NET Web API with Elastic Search and Kibana

Image
 ElasticSearch Elasticsearch is a search engine based on the Lucene library. It provides a distributes, multitenany-capable full-test search engine with an HTTP web interface and schema-free JSON documents. Kibana Kibana is a source-available data visualization dashboard software for Elasticsearch. Adding elastic search and kibana to the web API solution is a very simple tasks and it needs only a library to be installed and few configuration changes. Install Serilog.AspNetCore and Serilog.Sinks.Elasticsearch packages from nuget packkage manager in Visual Studio. Serilog.AspNetCore package helps to manage and show the logs using serilog and Serilog.Sinks.Elasticsearch connects with the elasticsearch instance and loads the logs into the elasticsearch. Next is to change the configurations to add elasticsearch to the API code. In the Program.cs file add the below lines to configure elasticsearch with serilog. Now the configurations fo...