Are there any C++ clients available for logstash?


(Alex) #1

I'm just now starting to look at what ELK can do for me.
The code that I have to work with is C++ only.
So the question now becomes: how do I get the data into logstash from C++?

I found this posting about calling go from C++: http://stackoverflow.com/questions/6125683/call-go-functions-from-c
Another solution may be to call the logstash REST api using a C++ http client.
Are there any recommendations, tutorials or sample code that can show me the recommended way to get data from my C++ server into logstash?


(Magnus Bäck) #2

Logstash supports tons of inputs, many of which have C++ interfaces. Just take your pick.

However, I'd just log to a file and have Logstash pick it up from there. You don't want your application to not log if Logstash is unavailable and you also don't want it to block until Logstash is available again. Hence, get the logs onto persistent storage as quickly and simply as possible.


(Alex) #3

@magnusbaeck Where do I find the C++ interfaces that you allude to?
@magnusbaeck Doesn't writing to the file-system slow things down? Though I hear you that it provides some persistence.


(Magnus Bäck) #4

Where do I find the C++ interfaces that allude to?

I just meant that there are ample C++ interfaces for sending messages via e.g. TCP, UDP, or HTTP.

Doesn't writing to the file-system slow things down?

Sure. If performance is more important to you than persistence and error-resilience is then maybe you should submit messages over the network instead.


(system) #5