Hi team - need your help for this painful issue.
-
My ES Index template with index pattern is "logstash-git"
{
"template": "git_template",
"index_patterns":["logstash-git"],
"mappings": {
"doc": {
"properties": {
"GIT_ORG": { "type": "text" },
"GIT_REPOS": { "type": "text" },
"COMMIT_SHA1": { "type": "text" },
"COMMIT_AUTHOR": { "type": "text" },
"COMMIT_DATE": { "type": "date",
"format": "yyyy-MM-dd"},
"COMMIT_COMMENT": { "type": "text" },
"JIRA_KEY": { "type": "text" },
"JIRA_ISSUE_TYPE": { "type": "text" },
"JIRA_ISSUE_CATEGORY": { "type": "text" },
"JIRA_PRIORITY": { "type": "text" },
"JIRA_COMPONENTS": { "type": "text" },
"JIRA_DEFECT_TYPE": { "type": "text" },
"JIRA_TESTCASE_ID": { "type": "text" },
"JIRA_FIND_BY_AUTO": { "type": "text" }
}
}
}
} -
My logstash configuration file is
input { file{ path => "C:/elkstack/elasticsearch-6.5.1/logs/git_commits.csv"
start_position => "beginning"
sincedb_path => "NUL" }
}filter { csv { columns => [ "GIT_ORG",
"GIT_REPOS",
"COMMIT_SHA1",
"COMMIT_AUTHOR",
"COMMIT_DATE",
"COMMIT_COMMENT",
"JIRA_KEY",
"JIRA_ISSUE_TYPE",
"JIRA_ISSUE_CATEGORY",
"JIRA_PRIORITY",
"JIRA_COMPONENTS",
"JIRA_DEFECT_TYPE",
"JIRA_TESTCASE_ID",
"JIRA_FIND_BY_AUTO"]
separator => ","}}
output {
elasticsearch {
action => "index"
hosts => "localhost:9200"
index => "logstash-git"
manage_template => true
template => "C:/elkstack/gittemp.json"
template_name=> "gittemp"
template_overwrite => true
document_type => "doc"}stdout { codec => rubydebug }
}
When I start logstash, there is below error in Elasticsearch, looks like there's more than 1 template matches the index logstash-git. But I check all templates that only 1 template matched by http://localhost:9200/_template?pretty and don't what where '_doc' comes from.
Please help.