i have forwarded sys log messages to my ELK.
i have used grok to filter this logs and abstract the fields, but it didn't work.
i am sure with my grok.
when i forward the php logs directly to the ELK, with another grok filter, it works !!!
any idea, why syslog message with grok, to splitt fields is not working?
please, i have updated my grok to
grok {
match => { "message" => "<%{BASE10NUM:elastics_code}>%{SYSLOGTIMESTAMP:elastics_time} cisco %{DATA:tmm1_code}: Rule <HTTP_RESPONSE>: Client:%{IPV4:client_ipv4} -- Server:%{IPV4:virtual_server_ip} -- URL:%{DATA:request_uri} -- username:%{DATA:username} -- Node:%{IPV4:node_ipv4} -- RES:%{BASE10NUM:server_response_code} -- country_area:%{DATA:country}" }
it works fine, and it add all fields except "username" and "country" !!!!
all other fields appeared fine, like "elastics_code" , "request_uri", ................
any idea please?
In your example message from your first post, neither of those fields exist, so I am not surprised they do not match. Please show both the message and the grok pattern indented by 4 spaces, so that they look like this
You don't get a username field because there is no username field in the event.
I do not understand why DATA does not match US. You can use GREEDYDATA to pick up the US and the following whitespace. Alternatively use country_area:%{NOTSPACE:country}
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.