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!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...