How to send application logs from a NodeJS app to the Elastic Stack hosted in Kubernetes?

I'm building a NodeJS application and trying to use the Elastic Stack to collect the logs. The logs I want are:

  • Error logs
  • Application logs like, user logged in, user performed this task, system performed this task, etc

Now my application is hosted in Kubernetes and I deployed the Elastic Stack also to the same GKE cluster. Now I'm new to Elastic Stack. I have a small idea that we have to send data to logstash and it sends to the elastic search. Then we can visualize in Kibana. I tried to follow several tutorials but still don't have a solid idea on how to do this. To connect my app to the stack. So, may I please know...

  • to where in the stack (elastic search, logstash or filebeat) I should send the logs,
  • how to send the logs from a NodeJS app to an elastic stack hosted in the same Kubernetes cluster,
  • what tools I should use to do this job.

Thanks in advance :slightly_smiling_face:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.