I am attempting to ingest a CSV file using logstash into an elasticsearch index that I have pre-defined using a PUT request. It appears that logstash is ingesting the CSV file not into the intended elasticsearch index, but into one labelled:
%{[@metadata][beat]}-2017.08.04
I am pasting the relevant logstash conf file, as well as the PUT request I used to pre-build the index. High-fives for any help:
BEGIN LOGSTASH CONF
input {
file {
path => "/var/elk/csv/sep/*.csv"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
csv {
separator => ","
columns => ["Pattern_Date","Operating_System","Client_Version","Policy_Serial",
"HI_Status","Status","Auto_Protect_On","Worst_Detection",
"Last_Scan_Time","Antivirus_engine_On","Download_Insight_On",
"SONAR_On","Tamper_Protection_On","Intrusion_Prevention_On",
"IE_Browser_Protection_On","Firefox_Browser_Protection_On",
"Early_Launch_Antimalware_On","Computer_Name","Server_Name",
"MAC_Address1"]
}
}
output {
elasticsearch {
hosts => "http://localhost:9200"
index => "sep-index"
}
}
END CONF
BEGIN INDEX CREATION
PUT sep-index
{
"mappings": {
"logs": {
"properties": {
"@timestamp": {
"type": "date",
"format": "basic_date"
},
"@version": {
"type": "string"
},
"Pattern_Date": {
"type": "date",
"format": "basic_date"
},
"Operating_System": {
"type": "keyword"
},
"Policy_Serial": {
"type": "keyword"
},
"HI_Status": {
"type": "keyword"
},
"Status": {
"type": "keyword"
},
"Auto_Protect_On": {
"type": "keyword"
},
"Worst_Detection": {
"type": "keyword"
},
"Last_Scan_Time": {
"type": "date",
"format": "basic_date"
},
"Antivirus_engine_On": {
"type": "keyword"
},
"Download_Insight_On": {
"type": "keyword"
},
"SONAR_On": {
"type": "keyword"
},
"Tamper_Protection_On": {
"type": "keyword"
},
"Intrusion_Prevention_On": {
"type": "keyword"
},
"IE_Browser_Protection_On": {
"type": "keyword"
},
"Firefox_Browser_Protection_On": {
"type": "keyword"
},
"Early_Launch_Antimalware_On": {
"type": "keyword"
},
"Computer_Name": {
"type": "keyword"
},
"Server_Name": {
"type": "keyword"
},
"MAC_Address1": {
"type": "keyword"
}
}
}
}
}
END INDEX CREATION