Splunk Search

How to fill empty field with the time now

medveleyenet1
New Member

My search throws empty time-related fields and I want to fill that compo with the current time

0 Karma

briancronrath
Contributor

Try adding this in to your search:

| eval now_time=now() | eval filled_time=coalesce(YourTimeFieldHere,now_time)|

Replace YourTimeFieldHere with whatever the name of your time-related field is. That should place the value of now() which is the current time into any empty value of your time field.

0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...