I still can't get data to go into es
I have made some changes:
- event file looks like this:
{"THRUSHPLUS": {"AGENT_ADDRESS_1": "","BARGE_CODE": "","BILL_OF_LADING": "","BL_ISSUING_AGENT": "","BOL_TYPE": "","CARGO_DESCRIPTION": "","CARGO_VOLUME": "1","CARRIER": "","CONTAINER_NUMBER": "","CONTAINER_TYPE": "","DISCHARGE_PORT_ATA": "2019-07-22 23:23:23","DISCHARGE_PORT_CITY": "","DISCHARGE_PORT_COUNTRY": "","DISCHARGE_PORT_ETA": "2019-07-22 23:23:23","DISCHARGE_PORT_LRT_CD": "","DISCHARGE_PORT_RAW_INFO": "","EQUIPMENT_STATUS": "","FCL_LCL": "","HAZMAT_CLASS": "","HAZMAT_CODE": "","HAZ_DESCRIPTION": "","HAZ_FLAG": "","ISO_CONTAINER_CODE": "","LOAD_PORT_ATD": "2019-07-22 23:23:23","LOAD_PORT_CITY": "","LOAD_PORT_COUNTRY": "","LOAD_PORT_ETD": "2019-07-22 23:23:23","LOAD_PORT_LRT_CD": "","LOAD_PORT_RAW_INFO": "","TARE_WEIGHT": "1","TEMP_CONTROLLED": "","TO_COUNTRY": "","TO_UNECE": "","TRAIN_CODE": "","TRUCK_CODE": "","VESSEL_NAME": "","VOYAGE_REF": "","WEIGHT_1": "1","WEIGHT_2": "1"}}
My logstash config looks like this:
input {
file {
type => "json"
path => "C:/ESTK/*.json"
start_position => "beginning"
sincedb_path => "NUL"
}
}
filter {
json {source => "THRUSHPLUS"}
}
output {
elasticsearch {
action => "index"
hosts => "http://localhost:9200"
index => "gt"
}
}
Though I have also tried substituting "message" for THRUSHPLUS.
This is my index map for es:
PUT gt
{
"settings" : {
"number_of_shards" : 1
},
"mappings" : {
"properties" : {
"CARGOLINKPLUS" : {
"properties" : {
"BARGE_CODE": { "type" : "text"},
"BOL_TYPE": { "type" : "text"},
"CARGO_DESCRIPTION": { "type" : "text"},
"CARGO_VOLUME": { "type" : "float"},
"CARRIER": { "type" : "text"},
"CONTAINER_NUMBER": { "type" : "text"},
"CONTAINER_TYPE": { "type" : "text"},
"DISCHARGE_PORT_ATA": { "type" : "date","format": "yyyy-MM-dd HH:mm:ss"},
"DISCHARGE_PORT_CITY": { "type" : "text"},
"DISCHARGE_PORT_COUNTRY": { "type" : "text"},
"DISCHARGE_PORT_ETA": { "type" : "date","format": "yyyy-MM-dd HH:mm:ss"},
"DISCHARGE_PORT_LOC_ID": { "type" : "text"},
"DISCHARGE_PORT_LRT_CD": { "type" : "text"},
"DISCHARGE_PORT_RAW_INFO": { "type" : "text"},
"EQUIPMENT_STATUS": { "type" : "text"},
"FCL_LCL": { "type" : "text"},
"HAZMAT_CLASS": { "type" : "text"},
"HAZMAT_CODE": { "type" : "text"},
"HAZ_DESCRIPTION": { "type" : "text"},
"HAZ_FLAG": { "type" : "text"},
"ISO_CONTAINER_CODE": { "type" : "text"},
"LOAD_PORT_ATD": { "type" : "date","format": "yyyy-MM-dd HH:mm:ss"},
"LOAD_PORT_CITY": { "type" : "text"},
"LOAD_PORT_COUNTRY": { "type" : "text"},
"LOAD_PORT_ETD": { "type" : "date","format": "yyyy-MM-dd HH:mm:ss"},
"LOAD_PORT_LOC_ID": { "type" : "text"},
"LOAD_PORT_LRT_CD": { "type" : "text"},
"LOAD_PORT_RAW_INFO": { "type" : "text"},
"TARE_WEIGHT": { "type" : "integer"},
"TEMP_CONTROLLED": { "type" : "text"},
"TRAIN_CODE": { "type" : "text"},
"TRUCK_CODE": { "type" : "text"},
"VESSEL_NAME": { "type" : "text"},
"VOYAGE_REF": { "type" : "text"},
"WEIGHT_1": { "type" : "float"},
"WEIGHT_2": { "type" : "float"}
}
}
}
}
}
I just get no data going in.