Getting Data In

How do you identify keywords from a .CSV and report them?

danfinan
Explorer

Hi all,

I'm a bit of Splunk newbie, please bear with me! Our web filtering software is currently forwarding events to Splunk and works well. I'd really like to achieve the title, but I'm not well versed in SPL yet, so I'm looking for some help!

I have a list of keywords in a CSV file; I'd like Splunk to identify those keywords in our web filtering events (separate data source). For example, If I have the word "HELLO" in my CSV, or if an event (URL) contains it — https://somewebsite.com/hi/88HELLO88 — I'd like Splunk to report this to me.

Could someone please give me some guidance on this? I'd really appreciate it!

Thank you!

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Try a subsearch like this:

index=foo [ | inputlookup keywords.csv | eval url="*".keyword."*" | fields url | format ] | ...

It should produce the equivalent of index=foo (url=*keyword1* OR url=*keyword2* OR...).

---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

Try a subsearch like this:

index=foo [ | inputlookup keywords.csv | eval url="*".keyword."*" | fields url | format ] | ...

It should produce the equivalent of index=foo (url=*keyword1* OR url=*keyword2* OR...).

---
If this reply helps you, Karma would be appreciated.

danfinan
Explorer

Thank you richgalloway, I managed to get my keyword list working from your code. Very much appreciated!

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...