elastic / beats

:tropical_fish: Beats - Lightweight shippers for Elasticsearch & Logstash
https://www.elastic.co/products/beats
Other
103 stars 4.92k forks source link

metricbeat dashboards install - unknown setting [index.mapping.single_type] #4659

Closed LeeDr closed 7 years ago

LeeDr commented 7 years ago
==> centos: ++ sudo metricbeat.sh setup -e
==> centos: 2017/07/12 21:09:17.878584 beat.go:470: INFO Home path: [/usr/share/metricbeat] Config path: [/etc/metricbeat] Data path: [/var/lib/metricbeat] Logs path: [/var/log/metricbeat]
==> centos: 2017/07/12 21:09:17.878610 beat.go:495: INFO Beat metadata path: /var/lib/metricbeat/meta.json
==> centos: 2017/07/12 21:09:17.878684 beat.go:477: INFO Beat UUID: 658992f5-d760-44b2-8cfe-ff374302ada2
==> centos: 2017/07/12 21:09:17.878693 beat.go:239: INFO Setup Beat: metricbeat; Version: 6.0.0-beta1
==> centos: 2017/07/12 21:09:17.879282 client.go:131: INFO Elasticsearch url: https://localhost:9200
==> centos: 2017/07/12 21:09:17.879437 metrics.go:23: INFO Metrics logging every 30s
==> centos: 2017/07/12 21:09:17.879478 pipeline.go:75: INFO Publisher name: localhost.localdomain
==> centos: 2017/07/12 21:09:17.879484 publish.go:108: INFO Publisher name: localhost.localdomain
==> centos: 2017/07/12 21:09:17.879548 metricbeat.go:31: INFO Register [ModuleFactory:[docker, mongodb, mysql, postgresql, system], MetricSetFactory:[aerospike/namespace, apache/status, ceph/cluster_disk, ceph/cluster_health, ceph/monitor_health, ceph/pool_disk, couchbase/bucket, couchbase/cluster, couchbase/node, docker/container, docker/cpu, docker/diskio, docker/healthcheck, docker/image, docker/info, docker/memory, docker/network, dropwizard/collector, elasticsearch/node, elasticsearch/node_stats, golang/expvar, golang/heap, haproxy/info, haproxy/stat, http/json, jolokia/jmx, kafka/consumergroup, kafka/partition, kibana/status, kubernetes/container, kubernetes/event, kubernetes/node, kubernetes/pod, kubernetes/state_container, kubernetes/state_deployment, kubernetes/state_node, kubernetes/state_pod, kubernetes/state_replicaset, kubernetes/system, kubernetes/volume, memcached/stats, mongodb/dbstats, mongodb/status, mysql/status, nginx/stubstatus, php_fpm/pool, postgresql/activity, postgresql/bgwriter, postgresql/database, prometheus/collector, prometheus/stats, rabbitmq/node, redis/info, redis/keyspace, system/core, system/cpu, system/diskio, system/filesystem, system/fsstat, system/load, system/memory, system/network, system/process, system/process_summary, system/socket, vsphere/datastore, vsphere/host, vsphere/virtualmachine, zookeeper/mntr]]
==> centos: 2017/07/12 21:09:17.880620 client.go:131: INFO Elasticsearch url: https://localhost:9200
==> centos: 2017/07/12 21:09:18.015233 client.go:654: INFO Connected to Elasticsearch version 6.0.0-beta1
==> centos: 2017/07/12 21:09:18.017927 load.go:59: INFO Loading template for Elasticsearch version: 6.0.0-beta1
==> centos: 2017/07/12 21:09:18.062682 load.go:88: INFO load template: metricbeat-6.0.0-beta1
==> centos: Loaded index template
==> centos: 2017/07/12 21:09:18.184055 load.go:94: INFO Elasticsearch template with name 'metricbeat-6.0.0-beta1' loaded
==> centos: 2017/07/12 21:09:18.184979 client.go:131: INFO Elasticsearch url: https://localhost:9200
==> centos: 2017/07/12 21:09:18.207615 client.go:654: INFO Connected to Elasticsearch version 6.0.0-beta1
==> centos: 2017/07/12 21:09:18.220367 beat.go:650: CRIT Exiting: Error importing Kibana dashboards: fail to create the Elasticsearch loader: fail to create the kibana index: Failed to create index: Elasticsearch response: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"unknown setting [index.mapping.single_type] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"}],"type":"illegal_argument_exception","reason":"unknown setting [index.mapping.single_type] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"},"status":400}: 400 Bad Request
==> centos: Exiting: Error importing Kibana dashboards: fail to create the Elasticsearch loader: fail to create the kibana index: Failed to create index: Elasticsearch response: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"unknown setting [index.mapping.single_type] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"}],"type":"illegal_argument_exception","reason":"unknown setting [index.mapping.single_type] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"},"status":400}: 400 Bad Request
andrewkroh commented 7 years ago

It looks like index.mapping.single_type can only be used with 5.6. This PR appears to have implemented the change. https://github.com/elastic/elasticsearch/pull/25375

https://www.elastic.co/guide/en/elasticsearch/reference/master/removal-of-types.html#_migrating_multi_type_indices_to_single_type

andrewkroh commented 7 years ago

For 6.x, dashboard loading should be going through Kibana's API. So there is no reason AFAIK for Beats to even be attempting to create the .kibana index when it does not exists. I believe this is also part of the issue.

This problem should not occur if the .kibana index already exists.

andrewkroh commented 7 years ago

I opened #4662 to fix this.