# Pushing logs over Lumberjack protocol from Node.js

**URL:** https://discuss.elastic.co/t/pushing-logs-over-lumberjack-protocol-from-node-js/104574
**Category:** Logstash
**Created:** [October 19, 2017, 3:08pm UTC](https://discuss.elastic.co/t/pushing-logs-over-lumberjack-protocol-from-node-js/104574 "2017-10-19T15:08:42Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![jthomas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jthomas/32/23196_2.png) [@jthomas](https://discuss.elastic.co/u/jthomas)
#### Post date: [October 19, 2017, 3:08pm UTC](https://discuss.elastic.co/t/pushing-logs-over-lumberjack-protocol-from-node-js/104574/1 "2017-10-19T15:08:42Z")

</div>

I'm trying to send logs to Logstash using the Lumberjack protocol from Node.js. I've found this NPM module which implements a client library for the protocol but I can't seem to get it working with an instance of ELK I'm running with Docker.

Here are the steps to reproduce the issue:

> <https://gist.github.com/jthomas/168e828ce1a65f99d10c9130e9ec87a9>

Having called the "writeDataFrame" methods, nothing appears in the corresponding console for the logstash output to indicate data has been received. Digging into the library, it looks like the "acks" are not returned from the socket.

I'm not sure if this library is still usable with Logstash or I have configured something incorrectly.

---

<div class="post-metadata">

### Author: ![xeraa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xeraa/32/48181_2.png) [@xeraa](https://discuss.elastic.co/u/xeraa)
#### Post date: [October 22, 2017, 6:07pm UTC](https://discuss.elastic.co/t/pushing-logs-over-lumberjack-protocol-from-node-js/104574/2 "2017-10-22T18:07:26Z")

</div>

Had a quick look at [https://github.com/spujadas/elk-docker/blob/es241\_l240\_k461/01-lumberjack-input.conf](https://github.com/spujadas/elk-docker/blob/es241_l240_k461/01-lumberjack-input.conf) (I think this is the source of the Lumberjack configuration) and this seems to fit your configuration.

Are you getting any logs from Logstash?

---

<div class="post-metadata">

### Author: ![jthomas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jthomas/32/23196_2.png) [@jthomas](https://discuss.elastic.co/u/jthomas)
#### Post date: [October 23, 2017, 2:50pm UTC](https://discuss.elastic.co/t/pushing-logs-over-lumberjack-protocol-from-node-js/104574/3 "2017-10-23T14:50:49Z")

</div>

Nothing appears in the console or in Kibana. If you run the same Node.js code with the container, do you see the logs?

---

<div class="post-metadata">

### Author: ![xeraa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xeraa/32/48181_2.png) [@xeraa](https://discuss.elastic.co/u/xeraa)
#### Post date: [October 29, 2017, 12:12am UTC](https://discuss.elastic.co/t/pushing-logs-over-lumberjack-protocol-from-node-js/104574/4 "2017-10-29T00:12:27Z")

</div>

So it mostly works. You just need to fix the index pattern where Logstash is writing it's data. You can see what happens with the following command:

```
$ curl "localhost:9200/_cat/indices?v" 02:06:58
health status index pri rep docs.count docs.deleted store.size pri.store.size 
yellow open .kibana 1 1 1 0 3kb 3kb 
yellow open %{[@metadata][beat]}-2017.10.29 5 1 4 0 9.2kb 9.2kb

```

Kibana can even work with this:

![Discover - Kibana 2017-10-29 02-11-29](https://us1.discourse-cdn.com/elastic/original/3X/c/e/cefdd25512c9b233439ea2e57923fdbc3cb1a48e.png)

---

<div class="post-metadata">

### Author: ![jthomas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jthomas/32/23196_2.png) [@jthomas](https://discuss.elastic.co/u/jthomas)
#### Post date: [October 31, 2017, 3:55pm UTC](https://discuss.elastic.co/t/pushing-logs-over-lumberjack-protocol-from-node-js/104574/5 "2017-10-31T15:55:27Z")

</div>

It does work!

Thanks for the help, I can see this was due to my inexperience with ELK.

---

<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 28, 2017, 4:01pm UTC](https://discuss.elastic.co/t/pushing-logs-over-lumberjack-protocol-from-node-js/104574/6 "2017-11-28T16:01:49Z")

</div>

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