I am sending my logs from apache and nginx to elasticsearch via rsyslog.
Parsing to json:
version=2
rule=:%remote_addr:word% %ident:word% %auth:word% [%@timestamp:char-to:]%] "%method:word% %request:word% HTTP/%httpversion:float%" %status:number% %requesttime:float% "%referrer:char-to:"%" "%agent:char-to:"%"
.
template(name="apache-nginx" type="list"){
property(name="$!all-json")
}
The problem is nginx logs like: [14/Jan/2020:08:48:23 +0100] so when send to elastic search it does not recognise it as date/time
Any tips tricks to fix it ? (no filebeats.) Has to be done with rsyslog/elasticsearch.