elastic / beats-dashboards

DEPRECATED. Moved to https://github.com/elastic/beats. Please use the new repository to add new issues.
Other
196 stars 73 forks source link

beats-dashboards should not use dynamic typing #94

Closed LeeDr closed 8 years ago

LeeDr commented 8 years ago

There's have a problem when you load beats-dashboards BEFORE saving other items from Kibana. I first noticed the problem when I tried to use the Kibana Timelion plugin and got an error;

{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"mapper [hits] cannot be changed
from type [long] to [int]"}],"type":"illegal_argument_exception","reason":"mapper [hits] cannot be changed
from type [long] to [int]"},"status":400}

This is because when beats-dashboards were loaded, hits was saved as a long, but Kibana and [all?] plugins use an 'int' for hits. @rashidkpc please correct me if I got this wrong.

LeeDr commented 8 years ago

Confirmed. I started Kibana before installing the beats-dashboards, (I had a .marvel-es-1-* index pattern), I went to Discover tab and used that index pattern and saved the default search. Then I loaded beats-dashboards, and now Timelion does work.

monicasarbu commented 8 years ago

@LeeDr Thank you for testing the beats dashboards. I think the problem appears because when you load the dashboards, the default search is overwritten to the one included in the beats-dashboards (that is logstash-*).

tsg commented 8 years ago

A possible solution seems to be to run something like this in the beats-dashboards loading script before loading the searches/viz/etc.:

curl -XPUT 'http://localhost:9200/.kibana/_mapping/search' -d'{"search": {"properties": {"hits": {"type": "integer"}, "version": {"type": "integer"}}}}'

I think this is essentially your third option and seems to be enough to get Timelion running. @rashidkpc: are there any other fields besides hits and version that might trigger the same issue?

tsg commented 8 years ago

This should be fixed now in master and 1.2.0 branch. Thank you @LeeDr and @rashidkpc for finding and investigating this!

LeeDr commented 8 years ago

I've verified on my integration test system :-)