[ZBX-16013] Elasticsearch 7.x+ deprecated mapping types. Zabbix uses "values" instead of "_doc" Created: 2019 Apr 17  Updated: 2019 Jun 04  Resolved: 2019 Jun 04

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: None
Affects Version/s: 4.2.0
Fix Version/s: None

Type: Incident report Priority: Minor
Reporter: Oleg Banin Assignee: Arturs Lontons
Resolution: Won't fix Votes: 0
Labels: database
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Reference of deprecation of index type from Elasticsearch site: https://www.elastic.co/guide/en/elasticsearch/reference/master/removal-of-types.html

Steps to reproduce:

  1. Create index template uint_template in elastic search according to note in https://www.zabbix.com/documentation/4.0/manual/appendix/install/elastic_search_setup
  2. Set Elasticsearch as zabbix backend for history

Result:
Zabbix index create as:

curl -X PUT \
 http://your-elasticsearch.here:9200/_template/uint_template \-H 'content-type:application/json' \ -d '{
   "template": "uint*",
   "index_patterns": ["uint*"],
   "settings" : {
      "index" : {
         "number_of_replicas" : 1,
         "number_of_shards" : 5
      }
   },
   "mappings" : {
      "values" : {
         "properties" : {
            "itemid" : {
               "type" : "long"
            },
            "clock" : {
               "format" : "epoch_second",
               "type" : "date"
            },
            "value" : {
               "type" : "long"
            }
         }
      }
   }
}'

And zabbix server pushing values to Elasticsearch index with type "values"
Expected:
Create index with the following command ("values" changed to "_doc"):

curl -X PUT \
 http://your-elasticsearch.here:9200/_template/uint_template \-H 'content-type:application/json' \ -d '{
   "template": "uint*",
   "index_patterns": ["uint*"],
   "settings" : {
      "index" : {
         "number_of_replicas" : 1,
         "number_of_shards" : 5
      }
   },
   "mappings" : {
      "_doc" : {
         "properties" : {
            "itemid" : {
               "type" : "long"
            },
            "clock" : {
               "format" : "epoch_second",
               "type" : "date"
            },
            "value" : {
               "type" : "long"
            }
         }
      }
   }
}'

And zabbix server pushing values to Elasticsearch index with type "_doc"



 Comments   
Comment by Arturs Lontons [ 2019 Apr 17 ]

Hi,

Zabbix currently does not support Elasticsearch  7.x

As per Zabbix documentation:

Setup procedure considered in this section is applicable to the following Elasticsearch versions: 5.0.x –> 6.1.x. In case an earlier or later version of Elasticsearch is used, some functionality may not work as intended.

We can change the type of this issue to a feature request, if you wish to request additional support or documentation for Elasticsearch 7.x

Comment by Arturs Lontons [ 2019 Jun 04 ]

Hi,
Closing the ticket due to lack of activity. Feel free to reopen it if you have any other comments.

Generated at Wed Apr 24 00:13:40 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.