bpaquet / node-logstash

Simple logstash implmentation in nodejs : file log collection, sent with zeromq
Other
517 stars 141 forks source link

Elasticsearch output generates always logstash pattern #109

Closed megastef closed 9 years ago

megastef commented 9 years ago

Hi,

I used "index_name=testindex" and "bulk_limit=50" and node-logstash generates wrong bulk requests using the 'logstash' pattern (which should be disabled by index_name):

POST /logstash-2015.07.15/logs/_bulk HTTP/1.1
Host: 127.0.0.1:8080
Connection: close
Transfer-Encoding: chunked

123e1
{"index": {}}
{"source":"stdin","message":"{\"name\":\"Kibana\",\"hostname\"
...

This shoud be:

POST /_bulk HTTP/1.1
Host: 127.0.0.1:8080
Connection: close
Transfer-Encoding: chunked

123e1
{"index": {"_index" : "testindex", "_type" : "log" } }
{"source":"stdin","message":"{\"name\":\"Kibana\",\"hostname\"
...
bpaquet commented 9 years ago

Fixed, thx you for reporting

megastef commented 9 years ago

Thx - for fixing it :+1: