Dicover tab is defunt when loading visualizations using CURL at command line

(Rajeev Ranjan) #1

I have been trying to achieve one click delpoyment of ELK(with some sample dashboard) using some shell scripts. Things work out fine except for glitches at the end. The discover tab does not load anything at all. It appears to be defunct.

Got to see this bad request in the logs for Kibana -

{"type":"response","@timestamp":"2017-05-18T14:49:59Z","tags":[],"pid":12961,"method":"put","statusCode":400,"req":{"url":"/es_admin/.kibana/_mapping/search","method":"put","headers":{"host":"localhost:5601","connection":"keep-alive","content-length":"271","accept":"application/json, text/plain, /","origin":"http://localhost:5601","kbn-version":"5.3.0","user-agent":"Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.110 Safari/537.36","content-type":"application/json","referer":"http://localhost:5601/app/kibana","accept-encoding":"gzip, deflate, sdch, br","accept-language":"en-US,en;q=0.8"},"remoteAddress":"","userAgent":"","referer":"http://localhost:5601/app/kibana"},"res":{"statusCode":400,"responseTime":249,"contentLength":9},"message":"PUT /es_admin/.kibana/_mapping/search 400 249ms - 9.0B"}

Had dumped the visualizations/dashboards using the following script -

curl -XPUT localhost:9200/.kibana/visualization/example4?pretty -d@example4.json
curl -XPUT localhost:9200/.kibana/dashboard/example?pretty -d@dashboard.json

Had imported these JSONs earlier from a running stack.

(Felix Stürmer) #2

Hi @raazeev64,

it looks like Kibana fails to update the mapping for the .kibana index. When importing the JSON upon deployment, make sure to dump and import the mapping beforehand. Otherwise the dynamic mapping algorithm of Elasticsearch might incorrectly guess some types which leads to mapping conflicts later.

(Rajeev Ranjan) #3

I tried updating the mapping beforehand.
curl -XPUT localhost:9200/.kibana/_mapping/config -d@kibanamapping.json

But the error persists. Getting the same for timeliontab too.

Can we get to see the kibana server logs somewhere?

(Felix Stürmer) #4

The error message from your initial post indicates that the mapping for the search type causes that failure. Try dumping the mapping for all types, not just the config type.

How you access the Kibana server log depends on the way you deploy it.

(Rajeev Ranjan) #5

Thanks @weltenwort.
I got it working. Dumped the mapping for all types.

(system) #6

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