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!

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