Logstash array how to and filter

Hi. I have a list of user name's with user ID 1-100 each user id case a name that contains to it.

Exmaple 01 "user 1" 02 "user2" etc.

I my log events I have user id known but not user name.

How can I match user id with a list of 100 names?

csv file look like this

1 , user 1
2, user 2
3, user 3 etc etc.

So let say I have user id 63 and I want to match it from that list.

Can I use an array or match hasch?

I can use 100 if but I dont want that.

Thanks a lot for you help.


A translate filter might work.

Du you have an example?

All log events I have user ID and I have a CSV file as I told you.

So I want to compare that id to a list from a CSV and add a field with user name.

csv look like this

user id, unername
01, example@domian.com
02 example2@domain.com
etc up to over 1000

See this thread.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.