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

**URL:** <https://discuss.elastic.co/t/how-to-send-application-logs-from-a-nodejs-app-to-the-elastic-stack-hosted-in-kubernetes/206161>\
**Category:** Elasticsearch\
**Created:** [November 1, 2019, 12:20pm UTC](https://discuss.elastic.co/t/how-to-send-application-logs-from-a-nodejs-app-to-the-elastic-stack-hosted-in-kubernetes/206161 "2019-11-01T12:20:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![THPubs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thpubs/32/56984_2.png) [@THPubs](https://discuss.elastic.co/u/THPubs)\
**Post date:** [November 1, 2019, 12:20pm UTC](https://discuss.elastic.co/t/how-to-send-application-logs-from-a-nodejs-app-to-the-elastic-stack-hosted-in-kubernetes/206161/1 "2019-11-01T12:20:46Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 29, 2019, 12:21pm UTC](https://discuss.elastic.co/t/how-to-send-application-logs-from-a-nodejs-app-to-the-elastic-stack-hosted-in-kubernetes/206161/2 "2019-11-29T12:21:01Z")

</div>

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