Code: Select all
{
"_index": "logstash-2015.03.19",
"_type": "syslog",
"_id": "Y9vs2TAbTbmua0cnpXdpiQ",
"_score": null,
"_source": {
"message": "10.64.2.48 - - [18/Mar/2015:17:18:55 -0700] \"GET / HTTP/1.0\" 200 1147",
"@version": "1",
"@timestamp": "2015-03-19T00:19:01.000Z",
"type": "syslog",
"host": "10.64.2.78",
"priority": 133,
"timestamp": "Mar 18 17:19:01",
"logsource": "az84ap93v",
"program": "Planning_dev_apache_access_log",
"severity": 5,
"facility": 16,
"facility_label": "local0",
"severity_label": "Notice"
},
"sort": [
1426724341000,
1426724341000
]
}Code: Select all
if [program] == 'Planning_dev_apache_access_log' {
grok {
match => [ 'message', '%{COMMONAPACHELOG}']
}
date {
match => [ 'timestamp', 'dd/MMM/yyyy:HH:mm:ss Z' ]
}
mutate {
replace => [ 'type', 'apache_access' ]
convert => [ 'bytes', 'integer' ]
convert => [ 'response', 'integer' ]
}
}