Splunk Search

How to update a timestamp field in a lookup csv that has many fields, but when you only want to update one field?

john_glasscock
Path Finder

I have a lookup with 4 fields per record. I want to update one of the fields, a timestamp with the last seen event time per host. How do I have the search query find the results and update just the timestamp field in the lookup table?

I.E Lookup.csv
CLM_pair Firewall_name Logging_Device Last_Seen

Here is what I am trying but doesn't work.

| inputlookup CheckpointFW.csv
| append
[ search index=ckpfw002 sourcetype=opsec
| rex "CN=(?P\S+),"
| fields _time FW
| stats values(FW) as "Firewall_Name" latest(_time) as "Last_Seen" by FW
| convert ctime("Last_Seen") ]
| stats count by Firewall_Name Last_Seen
| outputlookup append=true CheckpointFW.csv

0 Karma
Get Updates on the Splunk Community!

Community Content Calendar, November Edition

Welcome to the November edition of our Community Spotlight! Each month, we dive into the Splunk Community to ...

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...

Stay Connected: Your Guide to November Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...