Splunk Search

How to add more fields to my table result in my search?

nazanin2016
Path Finder

Hi I am trying to find Malware activity detected on vulnerable systems so I did the subsearch as follow:

source="antivirus log" [search source="Vulnerability scanner.csv" |dedup IP,Vulnerability|rename IP as dest |table dest]|table dest Result_Status Attack_Name

It works correctly, but I was wondering how can I add more fields (not only the dest field that is common in both logs) from vulnerability scanner log to the final table, here as you see I can just table the fields that are in my Anti virus logs (dest Result_Status Attack_Name).

Thanks,

Tags (2)
0 Karma
1 Solution

somesoni2
Revered Legend

Give this a try

(source="antivirus log" [search source="Vulnerability scanner.csv" |stats count by IP|rename IP as dest |table dest] ) OR source="Vulnerability scanner.csv" | eval dest=coalesce(dest,IP) | stats dc(source) as sources values(Result_Status) as Result_Status values(Attack_Name) as Attack_Name values(Field1FromScannerlog) as Field1FromScannerlog values(Field1FromScannerlog) as Field1FromScannerlog... by dest | where sources=2 | fields - sources

View solution in original post

somesoni2
Revered Legend

Give this a try

(source="antivirus log" [search source="Vulnerability scanner.csv" |stats count by IP|rename IP as dest |table dest] ) OR source="Vulnerability scanner.csv" | eval dest=coalesce(dest,IP) | stats dc(source) as sources values(Result_Status) as Result_Status values(Attack_Name) as Attack_Name values(Field1FromScannerlog) as Field1FromScannerlog values(Field1FromScannerlog) as Field1FromScannerlog... by dest | where sources=2 | fields - sources
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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