0

Here's a link to my gist code that I have coded and there is a screenshot of terminal which shows what kind of error it is.

I have double checked the format of JSON file but continuously getting the same error.

Please help. Sincerely,

  • Is it a problem similar to https://stackoverflow.com/questions/39288997/elasticsearch-root-mapping-definition-has-unsupported-parameters-index-not-a ? – Alex Perrin Oct 18 '17 at 15:30

1 Answers1

0

Update your vuln_ip.json to this:

{
  "mappings": {
    "vulnerabilities": {
      "properties": {
        "address": {
          "type": "ip"
        },
        "cpes": {
          "type": "text"
        },
        "port": {
          "type": "nested",
          "properties": {
            "portid": {
              "type": "integer"
            },
            "protocol": {
              "type": "text"
            },
            "service": {
              "type": "nested",
              "properties": {
                "extrainfo": {
                  "type": "text"
                },
                "name": {
                  "type": "text"
                },
                "ostype": {
                  "type": "text"
                },
                "product": {
                  "type": "text"
                },
                "version": {
                  "type": "text"
                }
              }
            },
            "state": {
              "type": "text"
            }
          }
        },
        "score": {
          "type": "text"
        }
      }
    }
  }
}

Modify your curl command to this curl -XPUT 'localhost:9200/vulnerable/' -d @vuln_ip.json.

Hatim Stovewala
  • 1,333
  • 10
  • 19