can't find reason for _grokparsefailure
Posted: Mon Mar 02, 2015 4:56 am
Hi,
we keep getting a _grokparsefailure on our syslog-messages from our firewall.
We checked our grok-match on http://grokconstructor.appspot.com/do/match#result
In NLS the events get parsed correctly, fields get set but we keep getting "_grokparsefailure".
Maybe someone finds an error we don't see.
thanks in advance
kind reagrds
Mike
example message1:
example message2:
example parsed message (json):
filter:
we keep getting a _grokparsefailure on our syslog-messages from our firewall.
We checked our grok-match on http://grokconstructor.appspot.com/do/match#result
In NLS the events get parsed correctly, fields get set but we keep getting "_grokparsefailure".
Maybe someone finds an error we don't see.
thanks in advance
kind reagrds
Mike
example message1:
Code: Select all
<30>2015:03:02-10:49:25 myfw-2 ulogd[26436]: id="2002" severity="info" sys="SecureNet" sub="packetfilter" name="Packet accepted" action="accept" fwrule="163" initf="eth0" outitf="eth1" srcmac="0:50:56:9b:5d:29" dstmac="0:1a:8c:f0:e2:c0" srcip="10.2.111.40" dstip="1.2.3.4" proto="6" length="52" tos="0x00" prec="0x00" ttl="127" srcport="53087" dstport="8000" tcpflags="SYN" Code: Select all
<190>2015:03:02-10:51:24 myfw-2 reverseproxy: id="0299" srcip="1.2.3.4" localip="7.8.9.10" size="0" user="-" host="1.2.3.4" method="GET" statuscode="304" reason="-" extra="-" exceptions="-" time="4272" url="/someurl/images/abcdefg.gif" server="my.vhost.local" referer="https://my.vhost.local/someurl/jsp/bla.jsp" cookie="JSESSIONID=15092056447439F5931BB8648F9C6DAC.EVO1" set-cookie="-"Code: Select all
{
"_index": "logstash-2015.03.02",
"_type": "syslog",
"_id": "lByV5MV4Q6qNgVyhFcHkkw",
"_score": null,
"_source": {
"message": "<190>2015:03:02-10:51:24 myfw-2 reverseproxy: id=\"0299\" srcip=\"1.2.3.4\" localip=\"7.8.9.10\" size=\"0\" user=\"-\" host=\"1.2.3.4\" method=\"GET\" statuscode=\"304\" reason=\"-\" extra=\"-\" exceptions=\"-\" time=\"16697\" url=\"/someurl/images/icon_print.gif\" server=\"my.vhost.local\" referer=\"https://my.vhost.local/someurl/jsp/abcefg.jsp\" cookie=\"JSESSIONID=15092056447439F5931BB8648F9C6DAC.EVO1\" set-cookie=\"-\"\n",
"@version": "1",
"@timestamp": "2015-03-02T09:51:24.000Z",
"type": "syslog",
"host": "192.168.132.254",
"tags": [
"_grokparsefailure"
],
"priority": 13,
"severity": 5,
"facility": 1,
"facility_label": "user-level",
"severity_label": "Notice",
"timestamp": "2015:03:02-10:51:24",
"fw_node": "myfw-2",
"fw_sub": "reverseproxy",
"fw_id": 299,
"fw_srcip": "1.2.3.4",
"fw_localip": "7.8.9.10",
"fw_size": 0,
"fw_user": "-",
"fw_host": "1.2.3.4",
"fw_method": "GET",
"fw_statuscode": 304,
"fw_reason": "-",
"fw_extra": "-",
"fw_exceptions": "-",
"fw_time": 16697,
"fw_ur": "/someurl/images/icon_print.gif",
"fw_server": "my.vhost.local",
"fw_referer": "https://my.vhost.local/someurl/jsp/abcdefg.jsp",
"fw_cookie": "JSESSIONID=15092056447439F5931BB8648F9C6DAC.EVO1",
"fw_set_cookie": "-"
},
"highlight": {
"message": [
"<190>2015:03:02-10:51:24 myfw-2 reverseproxy: id=\"0299\" srcip=\"1.2.3.4\" localip=\"7.8.9.10\" size=\"0\" user=\"-\" host=\"1.2.3.4\" method=\"GET\" statuscode=\"304\" reason=\"-\" extra=\"-\" exceptions=\"-\" time=\"16697\" url=\"/someurl/images/icon_print.gif\" server=\"my.vhost.local\" referer=\"https://myvhost.local/someurl/jsp/abcdefg.jsp\" cookie=\"JSESSIONID=@[email protected]@end-highlight@\" set-cookie=\"-\"\n"
],
"fw_cookie": [
"JSESSIONID=@[email protected]@end-highlight@"
]
},
"sort": [
1425289884000,
1425289884000
]
}Code: Select all
if [host] == '192.168.132.254' {
if [type] == 'syslog' {
grok {
match => [ 'message', '<190>%{DATA:timestamp} %{DATA:fw_node} %{DATA:fw_sub}: id="%{NUMBER:fw_id:int}" srcip="%{IP:fw_srcip}" localip="%{IP:fw_localip}" size="%{NUMBER:fw_size:int}" user="%{DATA:fw_user}" host="%{IP:fw_host}" method="%{DATA:fw_method}" statuscode="%{NUMBER:fw_statuscode:int}" reason="%{DATA:fw_reason}" extra="%{DATA:fw_extra}" exceptions="%{DATA:fw_exceptions}" time="%{NUMBER:fw_time:int}" url="%{DATA:fw_ur}" server="%{DATA:fw_server}" referer="%{DATA:fw_referer}" cookie="%{DATA:fw_cookie}" set-cookie="%{DATA:fw_set_cookie}"']
match => [ 'message', '<30>%{DATA:timestamp} %{DATA:fw_node} %{DATA}: id="%{NUMBER:fw_id:int}" severity="%{DATA:fw_severity}" sys="%{DATA:fw_sys}" sub="%{DATA:fw_sub}" name="%{DATA:fw_name}" action="%{DATA:fw_action}" fwrule="%{NUMBER:fw_fwrule:int}" initf="%{DATA:fw_initf}" outitf="%{DATA:fw_outitf}" srcmac="%{DATA:fw_srcmac}" dstmac="%{DATA:fw_dstmac}" srcip="%{DATA:fw_srcip}" dstip="%{DATA:fw_dstip}" proto="%{NUMBER:fw_proto:int}" length="%{NUMBER:fw_length:int}" tos="%{DATA:fw_tos}" prec="%{DATA:fw_prec}" ttl="%{NUMBER:fw_ttl:int}" srcport="%{NUMBER:fw_srcport:int}" dstport="%{NUMBER:fw_dstport:int}" tcpflags="%{DATA:fw_tcpflags}"']
}
date {
match => [ 'timestamp', 'yyyy:MM:dd-HH:mm:ss' ]
}
}
}