Getting Data In

Using a CSV to search

ryangibson99
Explorer

I am pretty sure this involves lookups but here is what I am attempting.

I have a list of users in a CSV (users.csv) but it's about 70 names. I want to search a certain sourcetype for these names without having to finger bang them in one at a time. How do I do this? I feel like this is covered somewhere and I have RTFM already. Any assistance with an answer or at least a nudge in the right direction would be greatly appreciated!

Tags (2)

ryangibson99
Explorer

AWESOME! Thanks so much!

0 Karma

Brian_Osburn
Builder

you actually can do that quite easily (I had the same issue):

sourcetype=*yoursourcetype* [ | inputlookup users.csv | fields user]

This will expand to something like this:

sourcetype=*yoursourcetype* user=user1
sourcetype=*yoursourcetype* user=user2

Hope this helps!

Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...