Reporting

How to combine two lookups for a report?

revanthammineni
Path Finder

Hi Everyone,

I'm working on combining two lookups for a certain report.

My question is:

Let's say I have a first  look up named hosts.csv with hosts a,b,c,d,e,f

and I have a second lookup decom.csv with hosts a,b,c.

 

I want to compare two lookups  and take off the values of second lookup in the first lookup. So, I should get just the "d,e,f"..

Please help me how to solve this.

TIA.

Labels (1)
Tags (3)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Here's one untested way to do it.  It assumes both lookups have the same column name "foo".

| inputlookup hosts.csv where NOT [ | inputlookup decom.csv | fields foo | format ]

 

---
If this reply helps you, Karma would be appreciated.
0 Karma

revanthammineni
Path Finder

Thanks for the reply. May I know why we are using format command here. I know, that format puts the data into  a single value but I don't really understand why you suggesting here.

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!

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

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 ...