# Are there any C++ clients available for logstash?

**URL:** <https://discuss.elastic.co/t/are-there-any-c-clients-available-for-logstash/33645>\
**Category:** Logstash\
**Created:** [November 3, 2015, 2:50pm UTC](https://discuss.elastic.co/t/are-there-any-c-clients-available-for-logstash/33645 "2015-11-03T14:50:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![iamthealex](https://avatars.discourse-cdn.com/v4/letter/i/e9c0ed/32.png) [@iamthealex](https://discuss.elastic.co/u/iamthealex)\
**Post date:** [November 3, 2015, 2:50pm UTC](https://discuss.elastic.co/t/are-there-any-c-clients-available-for-logstash/33645/1 "2015-11-03T14:50:53Z")

</div>

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](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?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [November 3, 2015, 2:53pm UTC](https://discuss.elastic.co/t/are-there-any-c-clients-available-for-logstash/33645/2 "2015-11-03T14:53:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![iamthealex](https://avatars.discourse-cdn.com/v4/letter/i/e9c0ed/32.png) [@iamthealex](https://discuss.elastic.co/u/iamthealex)\
**Post date:** [November 3, 2015, 3:20pm UTC](https://discuss.elastic.co/t/are-there-any-c-clients-available-for-logstash/33645/3 "2015-11-03T15:20:54Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [November 3, 2015, 3:31pm UTC](https://discuss.elastic.co/t/are-there-any-c-clients-available-for-logstash/33645/4 "2015-11-03T15:31:22Z")

</div>

> 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.

---

<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:** [July 6, 2017, 5:24am UTC](https://discuss.elastic.co/t/are-there-any-c-clients-available-for-logstash/33645/5 "2017-07-06T05:24:16Z")

</div>


