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!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

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