Unable to fetch mapping because Kibana requests the wrong URL to ES


I set up Kibana, Logstash and ES using docker-compose. Everything's working fine except that on the "Configure an index pattern" page Kibana can't find the logstash-* indices. I looked at Kibana logs and noticed that it does this:

GET /elasticsearch/logstash-*/_mapping/field/*?_=1495837868624&ignore_unavailable=false&allow_no_indices=false&include_defaults=true 404 93ms - 9.0B

But gets a 404 because it prefixed the url path with /elasticsearch.

However, the indices do exist on this path:

curl -u elastic 'localhost:9200/logstash-*/_mapping/field/*'

I got this in response:

{"logstash-2017.05.26":{"mappings":{"log":{"_ttl":{"full_name":"_ttl","mapping":{}},"stream.keyword":{"full_name":"stream.keyword","mapping":{"keyword":{"type":"keyword"}}}, (...)

The existing indices:

curl -u elastic:changeme 'localhost:9200/_cat/indices?v'
health status index                             uuid                   pri rep docs.count docs.deleted store.size pri.store.size
yellow open   .watcher-history-3-2017.05.26     StJvvWtJTtWouVXwRO4I2A   1   1        821            0      1.1mb          1.1mb
yellow open   .monitoring-logstash-2-2017.05.26 E7xFZ8pyR3qNMBnBUQ3Lmw   1   1        858            0    352.1kb        352.1kb
yellow open   .triggered_watches                6RXj7AqlR9idgF9AeCp_fw   1   1          5           48       27kb           27kb
yellow open   .monitoring-es-2-2017.05.26       mpi3d0DjRPCEHmQijSQnKA   1   1      16540          116     11.5mb         11.5mb
yellow open   logstash-2017.05.26               6MqtqxsJQuW1sbLqfA_bSw   5   1       5552            0    767.7kb        767.7kb
yellow open   .kibana                           JoCJ6Q9MRL2CjTo1qaib-w   1   1          3            0     15.3kb         15.3kb
yellow open   .monitoring-alerts-2              zviOqVa8SiK80KW6Ka2qlQ   1   1          1            0       13kb           13kb
yellow open   .monitoring-data-2                e5cGOCC0SzyxG9YEZOdzQw   1   1          4            0     21.1kb         21.1kb
yellow open   .watches                          QgwaAh46T6SYofG7yCM5iA   1   1          4            0     23.3kb         23.3kb
yellow open   .monitoring-kibana-2-2017.05.26   1_--ugI0RFOxGoqNaNmXeg   1   1        849            0    368.8kb        368.8kb
green  open   .security                         IboxlJWMS5OO5H3Wog8hlw   1   0          6            0     21.7kb         21.7kb

Is there anything I can do to fix that? I'm using version 5.4.0 of Kibana, Logstash and ElasticSearch


The prefix of elasticsearch you see is actually the Kibana proxy to Elasticsearch, so it can be omitted. To reproduce this request make sure you are preforming it against Kibana, for example: localhost:5601/elasticsearch/logstash-*/_mapping/field/*.

Is there anything in the elasticsearch logs when you're attempting to add the index pattern?

What do you get when making this request at Kibana? localhost:5601/elasticsearch/_cat/indices

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