I have a UniFi controller sending syslog data to logstash with custom patterns defined for parsing, and the data flow itself is working. However, the issue I am having is that I have no clue how to get the index definition defined appropriately. I'm working from information found at the following URL:
I believe I just have something small that needs to be tweaked in the following attempted definition, but I haven't found a clear explanation of what it could be:
Attempted Index Creation:
PUT /_index_template/unifisyslog_template?pretty
{
"unifisyslog" : {
"order" : 0,
"index_patterns" : [
"unifisyslog-*"
],
"settings" : {
"index" : {
"number_of_shards" : "1",
"number_of_replicas" : "1"
}
},
"mappings" : {
"doc" : {
"properties" : {
"ubiquiti.switch" : {
"type" : "object"
},
"source.geo" : {
"dynamic" : true,
"properties" : {
"ip" : {
"type" : "ip"
},
"location" : {
"type" : "geo_point"
},
"latitude" : {
"type" : "half_float"
},
"longitude" : {
"type" : "half_float"
}
}
},
"destination.geo" : {
"dynamic" : true,
"properties" : {
"ip" : {
"type" : "ip"
},
"location" : {
"type" : "geo_point"
},
"latitude" : {
"type" : "half_float"
},
"longitude" : {
"type" : "half_float"
}
}
},
"source.ip" : {
"type" : "ip"
},
"destination.ip" : {
"type" : "ip"
}
}
}
},
"aliases" : { }
}
}
I get an error on the "unifisyslog" item at the beginning, but I can't seem to find an example that shows me what would be different (I thought the name being assigned would be the first item?). Any pointers that could help me figure out how to format the request appropriately?