elasticsearch (kibana)映射程序异常,elasticsearch,kibana,elastic-stack,elasticsearch,Kibana,Elastic Stack" /> elasticsearch (kibana)映射程序异常,elasticsearch,kibana,elastic-stack,elasticsearch,Kibana,Elastic Stack" />

elasticsearch (kibana)映射程序异常

elasticsearch (kibana)映射程序异常,elasticsearch,kibana,elastic-stack,elasticsearch,Kibana,Elastic Stack,我正在尝试为此类日志设置映射(自动映射不起作用) 这是我要分析的日志,感谢kibana(在互联网上找到): 下面是错误: { "error": { "root_cause": [ { "type": "mapper_parsing_exception", "reason": "No type specified for field [index]" } ], "type": "mapper_parsing_exc

我正在尝试为此类日志设置映射(自动映射不起作用)

这是我要分析的日志,感谢kibana(在互联网上找到):

下面是错误:

{
  "error": {
    "root_cause": [
      {
        "type": "mapper_parsing_exception",
        "reason": "No type specified for field [index]"
      }
    ],
    "type": "mapper_parsing_exception",
    "reason": "Failed to parse mapping [doc]: No type specified for field [index]",
    "caused_by": {
      "type": "mapper_parsing_exception",
      "reason": "No type specified for field [index]"
    }
  },
  "status": 400
}

我已经在internet上搜索了一些解决方案,但没有找到任何可以帮助我的解决方案。

您缺少所有
对象
字段的
属性
关键字。请改用此映射

PUT logstash-2019.05.09
{
  "mappings": {
    "doc": {
      "properties": {
        "@timestamp": {
          "type": "date"
        },
        "ip": {
          "type": "ip"
        },
        "extension": {
          "type": "text"
        },
        "response": {
          "type": "text"
        },
        "geo": {
          "properties": {
            "coordinates": {
              "type": "geo_point"
            },
            "src": {
              "type": "text"
            },
            "dest": {
              "type": "text"
            },
            "srcdest": {
              "type": "text"
            }
          }
        },
        "tags": {
          "type": "text"
        },
        "utc_time": {
          "type": "date"
        },
        "referer": {
          "type": "text"
        },
        "agent": {
          "type": "text"
        },
        "clientip": {
          "type": "ip"
        },
        "bytes": {
          "type": "integer"
        },
        "host": {
          "type": "text"
        },
        "request": {
          "type": "text"
        },
        "url": {
          "type": "text"
        },
        "@message": {
          "type": "text"
        },
        "spaces": {
          "type": "text"
        },
        "xss": {
          "type": "text"
        },
        "links": {
          "type": "text"
        },
        "relatedContent": {
          "properties": {
            "url": {
              "type": "text"
            },
            "og:type": {
              "type": "text"
            },
            "og:title": {
              "type": "text"
            },
            "og:description": {
              "type": ""
            },
            "og:url": {
              "type": ""
            },
            "article:published_time": {
              "type": "date"
            },
            "article:modified_time": {
              "type": "date"
            },
            "article:section": {
              "type": "keyword"
            },
            "article:tag": {
              "type": "text"
            },
            "og:image": {
              "type": "text"
            },
            "og:image:height": {
              "type": "integer"
            },
            "og:image:width": {
              "type": "integer"
            },
            "og:site_name": {
              "type": "text"
            },
            "twitter:title": {
              "type": "text"
            },
            "twitter:description": {
              "type": "text"
            },
            "twitter:card": {
              "type": "keyword"
            },
            "twitter:image": {
              "type": "text"
            },
            "twitter:site": {
              "type": "keyword"
            }
          }
        },
        "machine": {
          "properties": {
            "os": {
              "type": "text"
            },
            "ram": {
              "type": "integer"
            }
          }
        },
        "@version": {
          "type": "integer"
        }
      }
    }
  }
}

您需要删除名为
index
的第一个字段,这是无用的,并且会破坏映射。我已删除了第一个索引字段,但现在我与名为geo的索引有相同的错误。但我不明白为什么我必须删除第一个索引。你能解释一下吗@Val
{
  "error": {
    "root_cause": [
      {
        "type": "mapper_parsing_exception",
        "reason": "No type specified for field [index]"
      }
    ],
    "type": "mapper_parsing_exception",
    "reason": "Failed to parse mapping [doc]: No type specified for field [index]",
    "caused_by": {
      "type": "mapper_parsing_exception",
      "reason": "No type specified for field [index]"
    }
  },
  "status": 400
}
PUT logstash-2019.05.09
{
  "mappings": {
    "doc": {
      "properties": {
        "@timestamp": {
          "type": "date"
        },
        "ip": {
          "type": "ip"
        },
        "extension": {
          "type": "text"
        },
        "response": {
          "type": "text"
        },
        "geo": {
          "properties": {
            "coordinates": {
              "type": "geo_point"
            },
            "src": {
              "type": "text"
            },
            "dest": {
              "type": "text"
            },
            "srcdest": {
              "type": "text"
            }
          }
        },
        "tags": {
          "type": "text"
        },
        "utc_time": {
          "type": "date"
        },
        "referer": {
          "type": "text"
        },
        "agent": {
          "type": "text"
        },
        "clientip": {
          "type": "ip"
        },
        "bytes": {
          "type": "integer"
        },
        "host": {
          "type": "text"
        },
        "request": {
          "type": "text"
        },
        "url": {
          "type": "text"
        },
        "@message": {
          "type": "text"
        },
        "spaces": {
          "type": "text"
        },
        "xss": {
          "type": "text"
        },
        "links": {
          "type": "text"
        },
        "relatedContent": {
          "properties": {
            "url": {
              "type": "text"
            },
            "og:type": {
              "type": "text"
            },
            "og:title": {
              "type": "text"
            },
            "og:description": {
              "type": ""
            },
            "og:url": {
              "type": ""
            },
            "article:published_time": {
              "type": "date"
            },
            "article:modified_time": {
              "type": "date"
            },
            "article:section": {
              "type": "keyword"
            },
            "article:tag": {
              "type": "text"
            },
            "og:image": {
              "type": "text"
            },
            "og:image:height": {
              "type": "integer"
            },
            "og:image:width": {
              "type": "integer"
            },
            "og:site_name": {
              "type": "text"
            },
            "twitter:title": {
              "type": "text"
            },
            "twitter:description": {
              "type": "text"
            },
            "twitter:card": {
              "type": "keyword"
            },
            "twitter:image": {
              "type": "text"
            },
            "twitter:site": {
              "type": "keyword"
            }
          }
        },
        "machine": {
          "properties": {
            "os": {
              "type": "text"
            },
            "ram": {
              "type": "integer"
            }
          }
        },
        "@version": {
          "type": "integer"
        }
      }
    }
  }
}