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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Catalog Is Now Generally Available on Splunk Cloud Platform

A Unified View of Your Data  Security logs, application events, business data, and historical telemetry often ...