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
Get Updates on the Splunk Community!

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...

Stay Connected: Your Guide to October Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...