elasticsearch 执行汇总作业时发生映射异常,elasticsearch,kibana,elasticsearch,Kibana" /> elasticsearch 执行汇总作业时发生映射异常,elasticsearch,kibana,elasticsearch,Kibana" />

elasticsearch 执行汇总作业时发生映射异常

elasticsearch 执行汇总作业时发生映射异常,elasticsearch,kibana,elasticsearch,Kibana,我有一个Kibana实例,它将java应用程序中的日志数据存储在每日索引中,如logstash-java-beats-2019.09.01。由于将来索引的数量可能相当大,我想创建一个汇总作业,以便能够将旧日志归档到单独的索引中,类似logstash java beats rollup。logstash-java-beats-2019.09.01索引中的典型文档如下所示: { "_index": "logstash-java-beats-2019.10.01", "_type": "_do

我有一个Kibana实例,它将java应用程序中的日志数据存储在每日索引中,如logstash-java-beats-2019.09.01。由于将来索引的数量可能相当大,我想创建一个汇总作业,以便能够将旧日志归档到单独的索引中,类似logstash java beats rolluplogstash-java-beats-2019.09.01索引中的典型文档如下所示:

{
  "_index": "logstash-java-beats-2019.10.01",
  "_type": "_doc",
  "_id": "C9mfhG0Bf_Fr5GBl6kTg",
  "_version": 1,
  "_score": 1,
  "_source": {
    "@timestamp": "2019-10-01T00:02:13.756Z",
    "ecs": {
      "version": "1.0.0"
    },
    "event_timestamp": "2019-10-01 00:02:13,756",
    "log": {
      "offset": 5729359,
      "file": {
        "path": "/var/log/application-name/application.log"
      }
    },
    "tags": [
      "service-name",
      "location",
      "beats_input_codec_plain_applied"
    ],
    "loglevel": "WARN",
    "java_class": "java.class.name",
    "message": "Log message here",
    "host": {
      "name": "host-name-beat"
    },
    "@version": "1",
    "agent": {
      "hostname": "host-name",
      "id": "a34af368-3359-495a-9775-63502693d148",
      "ephemeral_id": "cc4afd3c-ad97-47a4-bd21-72255d450232",
      "type": "filebeat",
      "version": "7.2.0",
      "name": "host-name-beat"
    },
    "input": {
      "type": "log"
    }
  }
}
因此,我使用以下配置创建了一个汇总作业:

{
  "config": {
    "id": "Test 2 job",
    "index_pattern": "logstash-java-beats-2*",
    "rollup_index": "logstash-java-beats-rollup",
    "cron": "0 0 * * * ?",
    "groups": {
      "date_histogram": {
        "fixed_interval": "1000ms",
        "field": "@timestamp",
        "delay": "1d",
        "time_zone": "UTC"
      }
    },
    "metrics": [],
    "timeout": "20s",
    "page_size": 1000
  },
  "status": {
    "job_state": "stopped",
    "current_position": {
      "@timestamp.date_histogram": 1567933199000
    },
    "upgraded_doc_id": true
  },
  "stats": {
    "pages_processed": 1840,
    "documents_processed": 5322525,
    "rollups_indexed": 1838383,
    "trigger_count": 1,
    "index_time_in_ms": 1555018,
    "index_total": 1839,
    "index_failures": 0,
    "search_time_in_ms": 59059,
    "search_total": 1840,
    "search_failures": 0
  }
}
但它无法汇总数据,出现以下异常:

Error while attempting to bulk index documents: failure in bulk execution:
[0]: index [logstash-java-beats-rollup], type [_doc], id [Test 2 job$GTvyIZtPhKqi-dtfVd6MXg], message [MapperParsingException[Could not dynamically add mapping for field [@timestamp.date_histogram.time_zone]. Existing mapping for [@timestamp] must be of type object but found [date].]]
[1]: index [logstash-java-beats-rollup], type [_doc], id [Test 2 job$v-r89eEpLvImr0lWIrOb_Q], message [MapperParsingException[Could not dynamically add mapping for field [@timestamp.date_histogram.time_zone]. Existing mapping for [@timestamp] must be of type object but found [date].]]
[2]: index [logstash-java-beats-rollup], type [_doc], id [Test 2 job$quCHwZP1iVU_Bs2fmhgSjQ], message [MapperParsingException[Could not dynamically add mapping for field [@timestamp.date_histogram.time_zone]. Existing mapping for [@timestamp] must be of type object but found [date].]]
...
logstash java beats rollup索引为空,即使有一些可用的汇总作业统计信息

我正在使用ElasticSearchV7.2.0 您能解释一下数据或汇总作业配置有什么问题吗