Logging directly to elasticsearch

Hi Team, I would like to send pre-formatted json logs directly to elastic search? I would like to avoid logstash/filebeat as I do not need any further parsing. Also, I see in a previous post you have recommended not to avoid logstash, but I want to try and see how I can do precisely that.

Which post is that?

I don't think it's saying not to use it, just saying why you may want to and the benefits it gives.

So if your client can handle things like bulk, retries, load balancing etc, then you should be ok.

that's great, but there really is no information on how to actually do it, I mean to send the formatted log file directly to elasticsearch. Please do let me know how we can achieve this. Assuming that the elasticsearch node is open to accepting incoming files from any source in my network.

It's an index request like any other, so https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-index_.html

1 Like

Hi Malcolm, apologies for a third follow up, but say i have a well formatted log file, this log file needs to be continuously written to elasticsearch and further to be viewable in Kibana.
As per my understanding, the article you mentioned allows me to manually put a file into elasticsearch and it would not be a continous process

You can not expect Elasticsearch to know what logs to fetch. For sending, you have to take care of that, which was pointed out already

So if your client can handle things like bulk, retries, load balancing etc, then you should be ok.

That is really what you would use Logstash for, or Filebeat... Or write your own log shipper...

1 Like

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