# Logstash plugin - elastic\_app\_search

**URL:** <https://discuss.elastic.co/t/logstash-plugin-elastic-app-search/246521>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [August 26, 2020, 10:31pm UTC](https://discuss.elastic.co/t/logstash-plugin-elastic-app-search/246521 "2020-08-26T22:31:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joel\_Crawford](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joel_crawford/32/128865_2.png) [@Joel\_Crawford](https://discuss.elastic.co/u/Joel_Crawford)\
**Post date:** [August 26, 2020, 10:31pm UTC](https://discuss.elastic.co/t/logstash-plugin-elastic-app-search/246521/1 "2020-08-26T22:31:40Z")

</div>

Hi,

I need help troubleshooting an error I'm getting trying to index documents to App Search using the logstash output plugin elastic\_app\_search.

**LogStash::ConfigurationError: Failed to connect to App Search. Error making http request**

I'm assuming I'm mistaken in my plugin params for either the **api\_key** or more likely the **host**

Currently config for the output looks like this:

```auto
elastic_app_search {
        engine => "test"
        document_id => "%{${DOC_ID}}"
        api_key => "${APP_API_KEY}"
        host => "${APP_HOST}"
  }

```

I'm getting my APP\_API\_KEY and APP\_HOST from the App Search Credentials page.

I'm using the API Endpoint as the host and the private-key with read/write permissions as the api\_key. Is this correct?

My configuration runs fine when sending output to elasticsearch and stdout. It also comes back as 'OK' when I run --config.test\_and\_exit

Thanks in advance! Joel.

---

<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:** [August 26, 2020, 10:50pm UTC](https://discuss.elastic.co/t/logstash-plugin-elastic-app-search/246521/2 "2020-08-26T22:50:11Z")

</div>

I'm going to move this one to the app search category 🙂

---

<div class="post-metadata">

**Author:** ![orhantoy](https://avatars.discourse-cdn.com/v4/letter/o/c5a1d2/32.png) [@orhantoy](https://discuss.elastic.co/u/orhantoy)\
**Post date:** [August 27, 2020, 1:50pm UTC](https://discuss.elastic.co/t/logstash-plugin-elastic-app-search/246521/3 "2020-08-27T13:50:29Z")

</div>

Hi @Joel_Crawford 👋

Your setup looks correct. I'm unsure if the `document_id` interpolation of `DOC_ID` works, but it sounds like your error is related to the HTTP connection itself.

Are you using App Search on [swiftype.com](http://swiftype.com), Elastic Cloud or as self-managed? If you're on Elastic Cloud or self-managed you should be able to see some logs.

---

<div class="post-metadata">

**Author:** ![Joel\_Crawford](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joel_crawford/32/128865_2.png) [@Joel\_Crawford](https://discuss.elastic.co/u/Joel_Crawford)\
**Post date:** [August 31, 2020, 6:40pm UTC](https://discuss.elastic.co/t/logstash-plugin-elastic-app-search/246521/4 "2020-08-31T18:40:24Z")

</div>

Hey, thanks.

I'm on Elastic Cloud. Sending a get request to: **/api/as/v1/engines/\<engine\_name\>/logs/api**  
I get a listing of logs but I can't find any result with a status that isn't 200.

How might I use the endpoint to specify that I'm looking for results specific to indexing and not search? Or specify a filter of status != 200... I see there's a query param and a filter/status but there's not much documentation: [https://www.elastic.co/guide/en/app-search/current/api-logs.html](https://www.elastic.co/guide/en/app-search/current/api-logs.html)

Or is there another way to get the logs? Or are there other logs?

Thanks! Joel.

---

<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:** [September 28, 2020, 6:40pm UTC](https://discuss.elastic.co/t/logstash-plugin-elastic-app-search/246521/5 "2020-09-28T18:40:44Z")

</div>

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