Knowledge Management

Matching keywords from raw events and tag specific keywords to respective static lookup columns

manish_singh_77
Builder

Hi All,

I am trying to match keywords from raw events and then try to tag respective keywords to the relevant columns present in the static lookup.

Here is my query

index=abc cpu OR memory OR disk OR Error OR Fatal OR shutdown
| rex field=_raw "(?|cpu|memory|disk|Error|Fatal|shutdown)"|join type=left comonfieldname[inputlookup testing.csv]

But I also want to match the keywords to the respective columns

For example if the keywords is cpu then it should be mapped to all the four columns correctly in the lookup

Tags (1)
0 Karma

dmarling
Builder

Can you provide more information on what field in your lookup file you would be matching? If you the value of cpu, memory, disk, Error, Fatal, and shutdown are in a specific field, you just need to make your rex extraction be that field name:

| rex field=_raw "(?<fieldNameinCSV>(cpu|memory|disk|Error|Fatal|shutdown))"
| lookup testing.csv fieldNameinCSV
If this comment/answer was helpful, please up vote it. Thank you.
0 Karma

manish_singh_77
Builder

Let me explain you, I have 4 columns in my lookup table and when any keywords are found from the raw data of the indexes then it should get tagged to the following columns of the lookup
For instance, I get cpu keywords in the raw data then it should tag against the respective cpu columns of the lookup table

0 Karma

dmarling
Builder

If you could give an example of what is in your lookup table for each one of the use cases, it would make it significantly easier to write a query that accomplishes your requirements. I believe I understand what you are asking for, but I need that example to create a query that accomplishes what you need. Thank you!

If this comment/answer was helpful, please up vote it. Thank you.
0 Karma

manish_singh_77
Builder

This is not working for me

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...