Logstash plugin - elastic_app_search

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:

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.

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

Hi @Joel_Crawford :wave:

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, Elastic Cloud or as self-managed? If you're on Elastic Cloud or self-managed you should be able to see some logs.

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

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

Thanks! Joel.

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