junegunn / redis-stat

(UNMAINTAINED) A real-time Redis monitoring tool
MIT License
2.02k stars 339 forks source link

Elasticsearch of version 6.0 cannot upload data. #72

Open One1W opened 6 years ago

One1W commented 6 years ago

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

mzinboy commented 6 years ago

You should modify redis-stat/lib/redis-stat/elasticsearch.rb file.

` 24 def initialize hosts, elasticsearch 25 url, @index = elasticsearch 26 @hosts = hosts 27 @client = Elasticsearch::Client.new :url => url, 28 transport_options: { 29 headers: { 'Content-Type' => 'application/json' } 30 } 31 end

`

wkcaeser commented 5 years ago

use nginx

proxy_set_header Content-Type application/json;