# ELK web APIs

**URL:** <https://discuss.elastic.co/t/elk-web-apis/107794>\
**Category:** Logstash\
**Created:** [November 15, 2017, 5:28pm UTC](https://discuss.elastic.co/t/elk-web-apis/107794 "2017-11-15T17:28:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kundavaram](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kundavaram/32/24287_2.png) [@kundavaram](https://discuss.elastic.co/u/kundavaram)\
**Post date:** [November 15, 2017, 5:28pm UTC](https://discuss.elastic.co/t/elk-web-apis/107794/1 "2017-11-15T17:28:50Z")

</div>

Hello,

I'm new to ELK Stack.

We would like to feed logs that are generated from our middleware application (Biztalk). I'm considering couple of options:

1. My app generated an XML logs and whats the best way to feed them to ELK.  
Beats (read xml) -\> Logstash (transform) -\> Elk stack is the correct approach?

2. My app can generated JSON if needed so can I leverage ELK webapi (if any) and feed ELK. This way I can avoid Logstash.

Please recommend.

---

<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 15, 2017, 6:40pm UTC](https://discuss.elastic.co/t/elk-web-apis/107794/2 "2017-11-15T18:40:51Z")

</div>

JSON logs (one line per log entry, i.e. not pretty printed JSON) would be the easiest option and is much preferable to XML. Whether you want to have Beats post directly to Elasticsearch is up to you and your needs.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 15, 2017, 6:44pm UTC](https://discuss.elastic.co/t/elk-web-apis/107794/3 "2017-11-15T18:44:18Z")

</div>

FYI we’ve renamed ELK to the Elastic Stack, otherwise Beats and APM feel left out! 😉

---

<div class="post-metadata">

**Author:** ![kundavaram](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kundavaram/32/24287_2.png) [@kundavaram](https://discuss.elastic.co/u/kundavaram)\
**Post date:** [November 15, 2017, 7:20pm UTC](https://discuss.elastic.co/t/elk-web-apis/107794/4 "2017-11-15T19:20:11Z")

</div>

Thanks Magnus,

If I choose to feed ElasticSearch directly (avoid Beats , logstash) what would be my options, Web Apis?

Also, what would be the best practice in general?

---

<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 15, 2017, 8:16pm UTC](https://discuss.elastic.co/t/elk-web-apis/107794/5 "2017-11-15T20:16:13Z")

</div>

> If I choose to feed Elasticsearch directly (avoid Beats , logstash) what would be my options, Web Apis?

Yes, Elasticsearch has an extensive REST API.

> Also, what would be the best practice in general?

Don't make your logging framework (Log4j or whatever) send stuff over the network. If you have issues with the network or Elasticsearch you either have to

- drop log messages,
- buffer them in memory, or
- block the application,

none of which are very appealing options. Just write the logs to disk (preferably in JSON format) and have Filebeat pick them up and ship somewhere.

---

<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:** [December 13, 2017, 8:16pm UTC](https://discuss.elastic.co/t/elk-web-apis/107794/6 "2017-12-13T20:16:19Z")

</div>

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