Json template format logstash 7.6.2

Hi All, I am new to applying json templates. I have ELK Stack 7.6.2

My template looks like below:

{ 
  "mappings": {
    "_doc": {
      "_all": {
        "enabled": true,
        "norms": {
          "enabled": false
        }
      },
      "dynamic_templates": [
        {
            "Exception":{
                "path_match":   "exception.values.stacktrace.*",
                "match_mapping_type": "object",
                "mapping":{
                "type": "nested"
                }
            }
        },
        {
          "ls-watcher": {
            "mapping": {
              "doc_values": true,
              "ignore_above": 1024,
              "index": "not_analyzed",
              "type": "{dynamic_type}"
            },
            "match": "*"
          }
        }
      ],
     "properties": {
        "timestamp":{
          "type": "date",
          "format": "epoch_millis"
        },
        "message": {
          "type": "keyword"
        },
        "request": {
                "type": "object"
        },
        "logger": {
                "type": "keyword"
        },
        "tag": {
                "type": "object"
        },
        "extra": {
                "type": "object"
        },
        "project": {
                "type": "keyword"
        },
        "env": {
                "type": "keyword"
        },
        "user": {
                "type": "keyword"
        },
        "eventId": {
                "type": "keyword"
        },
        "release": {
                "type": "keyword"
        },
        "culprit": {
                "type": "keyword"
        },
        "profiling": {
                "type": "keyword"
        },
        "performance": {
                "type": "double"
        },
        "breadcrumbs": {
                "enabled": false
        }                     
        ,"fingerprint": {
                "type" : "keyword"
        }
      }
    }
  },
  "settings": {
    "index.refresh_interval": "5s"
  },
  "template": "*ls_watcher-*"
}

Looks like there is some syntax issue with the json as I see the following:

curl -u abc:abc123 -X GET "http://1.2.3.4:3045/_template/ls_watcher/_search?q=*:*"
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"request [/_template/ls_watcher/_search] contains unrecognized parameter: [name]"}],"type":"illegal_argument_exception","reason":"request [/_template/ls_watcher/_search] contains unrecognized parameter: [name]"},"status":400}

Please help in pointing out the syntax issue with the json. thanks

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.