Splunk Search

Append multiple field values to a csv list

josplunk
Engager

Hi folks,

I'm trying to append multiple field values to a csv as a result of a search. The csv file contains a list of seen hashes. 

I have the following query:

index=AV NOT([ | inputlookup Hashes.csv | stats values(hashes) AS search| format ])

So, the question here is, how can I add the resulting hash values from the previous search into the CSV?

I already try with the following qery with no results:

| foreach * [|append [makeresults | eval hashes=file_hash] | fields hashes | outputlookup Hashes.csv]

Labels (3)
Tags (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Try something like this

index=AV NOT([ | inputlookup Hashes.csv | stats values(hashes) AS search| format ])
| table hashes
| outputlookup append=t Hashes.csv

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust

Try something like this

index=AV NOT([ | inputlookup Hashes.csv | stats values(hashes) AS search| format ])
| table hashes
| outputlookup append=t Hashes.csv
Get Updates on the Splunk Community!

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to Officially Supported Splunk ...