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.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

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

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...