Pushing logs over Lumberjack protocol from Node.js

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:

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.

Had a quick look at 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?

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

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

It does work!

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

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