Search code examples
node.jsangularlogstashelastic-stackelk

How to configure Angular app with ELK stack


I want to configure my Angular app with ELK stack.

Option 1:send from Angular an http post request to logstash.

Option 2: send from Angular an http post request to node.js server, and that server will send the messages to logstash.

Maybe there are another options, but i dont know. I didnt find any tutorials about it.

What is right way to do that?


Solution

  • Create a usable API with either REST or GraphQL or other (gRPC up to you really) to connect the client with the server, it is the most complete technique for anything wholesome. From there you can then add more features to it and have a seed project for the future aswell. Technically the Client sends a query to the API of your choice then the API talks with the server that the logic dictates (this can be elasticsearch / express / or any other) and then it either logs data on elastic or the DB or any other.