{"error":"Content-Type header [application/x-www-form-urlencoded] is not supported","status":406}

(Chiang Poh Lin) #1

Hi, so i was installing elk on server following this website: https://www.digitalocean.com/community/tutorials/how-to-install-elasticsearch-logstash-and-kibana-elk-stack-on-ubuntu-14-04#load-kibana-dashboards
so until here:
cd ~
curl -L -O https://download.elastic.co/beats/dashboards/beats-dashboards-1.1.0.zip
Install the unzip package with this command:

sudo apt-get -y install unzip
Next, extract the contents of the archive:

unzip beats-dashboards-*.zip
And load the sample dashboards, visualizations and Beats index patterns into Elasticsearch with these commands:

cd beats-dashboards-*

when i try ./load.sh
alot of
{"error":"Content-Type header [application/x-www-form-urlencoded] is not supported","status":406}
came out, what can i do?

i googled and it says to add this line -H "Content-Type: application/json
? it seems irrelevant to my situation ?

the load.sh :--

i also read that : https://www.elastic.co/blog/strict-content-type-checking-for-elasticsearch-rest-requests
they did some changes so scripts need to be change..but can someone suggest how should i change it?

(ruflin) #2

We now include the dashboards directly with each beat and you can load it with the beat directly

It seems in the above you are using a community beat. If you want to load these dashboards with the script you must make sure to adjust the curl command to also include the json header.

(system) #3

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