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!

Announcing Scheduled Export GA for Dashboard Studio

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

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...