I can now succesfully recieve Logs from my Synology. Now i have to add some fields. At the moment i don't have everything as a field in Kibana. So in Kibana the message contains the import information.
The message looks like that: WinFileService Event: delete, Path: /TEST/asd, User: Hans.Peter, IP: 192.168.0.29
So my question how does the KV filter looks like I have to build that I have in the end all fields to filter in Kibana?
I still don't understand everything. The logs ar comming from a Synology via port: 5514 TCP.
So I have configured an input and output file. You can view it on pastebin: https://pastebin.com/Dar5QajU
Your grok filter doesn't do anything useful. You're parsing the message field, matching the whole string, and storing the matched result in the message field. I don't know what you're trying to accomplish.
You're right and with this filter "enabled" it doesn't work at the moment. Could you give me an example how i have to do it when I want to filter: WinFileService Event ? I close to the solution but in my head somwhere I don't understand something wrong.
You'll probably want to use a grok filter to extract the first word ("WinFileService") to a separate field so that "Event" becomes the first key/value field that's extracted (rather than "WinFileService Event").
Hmm I think I have to explain again what I want to do.
I want to greate fields for the information which is in the message field.
The message looks like that: WinFileService Event: Delete, Path: /Privat/asd, File/Folder: Folder, Size: NA, User: Hispeed, IP: 192.168.0.29
So my idea was to do it via KV Filter. Then i switched to the grok filter. I want to have in the end the following fields:
WinFileService Event
Path
File/Folder
Size
User
IP
In the end I can then filter in Kibana for those fields. Because I'm still learning I started with the first field and not all together.
Which solution is the best to do that: grok or kv?
I can't put the things together in my head.
Which one is "foo" from my log message? Is "somefield" = "WinFileServiceEvent_WMA"?
What about Hello World, from %{host} ?
This is not bad, but of course not perfect.
IP = OK
User = only the firstname so i have User: firstname lastname (This means lastname is cutted of)
Path= Is starting correct but there is the same problem as in the User field when there is a space.
How can I now fix that with the spaces?
I made a picture then you can see the output and the problem.
Aha. Remove the trailing space from field_split so that there's just a comma. Multi-character field splits aren't supported. You may have to set trim_key to a space so avoid getting a leading space in the field names.
I have set trim and with this is works nearly perfectly. Now I could do a somehow a beauty correct because if there is now a space in the message for example in the Path:
You can see that the space between: "Diverses" and "unsortiert" is cutted of. Is there a simple way to fix that?
Thank you so far for the support. I'm already very happy :).
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.