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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...