How input csv data without header with logstash


(Indria Suta Risani) #1

Hi,

I tried to input csv data with out header. How create config file

data as below

02/11/2018-23:26:15,cbtcnb-smscp2p-09,KRUSTY ,8-5ba294bf,"dinni.rds_uerror_in","",c,0,3,3,0,0,6
02/11/2018-23:26:15,cbtcnb-smscp2p-09,KRUSTY ,8-5ba294bf,"dinni.ati_cnf_in","",c,206,215,207,180,169,977
02/11/2018-23:26:15,cbtcnb-smscp2p-09,KRUSTY ,8-5ba294bf,"dinni.mt_fsm_msc_req_out","",c,1724,1775,1707,1590,1624,8420
02/11/2018-23:26:15,cbtcnb-smscp2p-09,KRUSTY ,8-5ba294bf,"dinni.ati_req_out","",c,207,214,207,181,168,977

config logstash

input {
file {
path => "/opt/log/omn/ss7*.csv"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
csv {
separator => ","
csv_options = { "headers"=> true }
columns => ["DateTime","NodeName","Container","Container ID","CounterName","Filler","Type","Int1","Int2","Int3","Int4","Int5","TotalInt"]
]
}
mutate {convert => ["Int1","integer"] }
mutate {convert => ["Int2","integer"] }
mutate {convert => ["Int3","integer"] }
mutate {convert => ["Int4","integer"] }
mutate {convert => ["Int5","integer"] }
mutate {convert => ["TotalINt","integer"] }
}
output {
elasticsearch {
hosts => "http://127.0.0.1:9200"
index => "openmindstatistic"
document_type => "openmind_statistic"
}
stdout{}
}


(system) #2

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