Fielddata is disabled on text fields by default. Set fielddata=true on [beat.name]


(Yu Watanabe) #1

Hi.

I have imported dashboard template using import_dashboards.sh for metricbeat.
But below errors appears when I select any of the imported dashhboard.

My Environemnt
metricbeat-5.0.0 alpha5
kibana-5.0.0 alpha5

Do I need to fix the index-pattern json file ?


(ruflin) #2

Did you load the metricbeat index template before loading the dashboard? Under 5.0 beat.name should be a keyword: https://github.com/elastic/beats/blob/master/metricbeat/metricbeat.template.json#L184

The index template is loaded automatically the first time you start metricbeat.


(Monica Sarbu) #3

I have tried to load the dashboards before starting metricbeat for the first time, and I don't get this error when opening any dashboard. Could you please give us more details here? What version of Elasticsearch are you using?

Can you please let us know what value is returned by the following command? Is the value different than { }? Is it different than the metricbeat.template.json file or metricbeat.template-es2x.json if you are using the Elasticsearch 2.x, available in the metricbeat package?

curl -XGET 'http://localhost:9200/_template/metricbeat?pretty=true'

(Yu Watanabe) #4

Hello @ruflin @monica.

Thanks for the reply.

Below is my version info of elasticsearch and metricbeat.

[root@BS-POC-Test-Env kibana]# rpm -qi elasticsearch
Name        : elasticsearch
Epoch       : 0
Version     : 5.0.0_alpha5
Release     : 1
Architecture: noarch
Install Date: Fri 02 Sep 2016 09:14:40 AM UTC
Group       : Application/Internet
Size        : 35717321
License     : 2009
Signature   : RSA/SHA1, Thu 04 Aug 2016 09:03:01 AM UTC, Key ID d27d666cd88e42b4
Source RPM  : elasticsearch-5.0.0_alpha5-1-src.rpm
Build Date  : Thu 04 Aug 2016 09:03:00 AM UTC
Build Host  : vagrant-ubuntu-trusty-64
Relocations : /usr
Packager    : Elasticsearch
Vendor      : Elasticsearch
URL         : https://www.elastic.co/
Summary     : Elasticsearch is a distributed RESTful search engine built for the cloud. Reference documentation can be found at https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html and the 'Elasticsearch: The Definitive Guide' book can be found at https://www.elastic.co/guide/en/elasticsearch/guide/current/index.html
Description :
Elasticsearch subproject :distribution:rpm

[root@BS-POC-Test-Env kibana]# rpm -qi metricbeat
Name        : metricbeat
Version     : 5.0.0_alpha5
Release     : 1
Architecture: x86_64
Install Date: Sun 11 Sep 2016 09:48:34 PM UTC
Group       : default
Size        : 19063002
License     : ASL 2.0
Signature   : (none)
Source RPM  : metricbeat-5.0.0_alpha5-1.src.rpm
Build Date  : Thu 04 Aug 2016 11:20:06 AM UTC
Build Host  : 51b02caac0ef
Relocations : /
Packager    : <@51b02caac0ef>
Vendor      : Elastic
URL         : https://github.com/elastic/beats/metricbeat
Summary     : Sends metrics to Elasticsearch.
Description :
Sends metrics to Elasticsearch.

I also have the latest xpack installed.

[root@BS-POC-Test-Env bin]# ./elasticsearch-plugin list -v
Plugins directory: /usr/share/elasticsearch/plugins
x-pack
- Plugin information:
Name: x-pack
Description: Elasticsearch Expanded Pack Plugin
Version: 5.0.0-alpha5
 * Classname: org.elasticsearch.xpack.XPackPlugin

[root@BS-POC-Test-Env bin]# ./kibana-plugin list
x-pack@5.0.0-alpha5-SNAPSHOT

Regarding to _template API , it shows nothing ....

[root@BS-POC-Test-Env kibana]# curl -u elastic:elastic -XGET 'http://localhost:9200/_template/metricbeat?pretty=true'
{ }

(Yu Watanabe) #5

I have forgotten to import the template.

However, since I use logstash as a indexer, I manually imported the template as shown in the document.

The curl command returned empty result and I have missed this fact.

[root@BS-POC-Test-Env metricbeat]# curl -u elastic:elastic -XPUT 'http://localhost:9200/_template/metricbeat' -d@/etc/metricbeat/metricbeat.template.json
curl: (52) Empty reply from server

As pointed in here,
I have added the -H option in curl command and now I have my dashboard working.

[root@BS-POC-Test-Env metricbeat]# curl -u elastic:elastic -H 'Expect:' -XPUT 'http://localhost:9200/_template/metricbeat' -d@/etc/metricbeat/metricbeat.template.json


(system) #6

This topic was automatically closed after 21 days. New replies are no longer allowed.