Getting Data In

cross files csv as to as rechercheV in excel

jamfal
New Member

hello every body,
my question is:

If i have 2 csv files in Splunk
One with the list of servers
The other antivirus coverage of servers
Is it possible to cross the files in order to find the servers that have antivirus cover among those of my list

Tags (1)
0 Karma

woodcock
Esteemed Legend

Assuming both files use host as the field name, search like this:

| inputcsv AntiVirusResults | eval source="AV"
| appendpipe [| inputcsv ServerList | eval source="SL" ]
| stats dc(source) AS numSources values(source) AS sources BY host

Then add this to show hits:

| search numSources=2

Or add this to show misses:

| search sources="SL" AND numSources=1
0 Karma

dineshraj9
Builder

You can join based on the servername and then check the antivirus coverage -

| inputlookup serverlist.csv | table servername | lookup server_antivirusdetails.csv servername OUTPUT antivirus_version | fillnull value="NA" antivirus_version

Here servername is common field between 2 lookups. Places where there are no match, the antivirus_version will be set as "NA"

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...