Getting Data In

can I mix extracted and current timestamps when ingesting data?

cphair
Builder

I have a CSV dataset with (only) a year field. I'd like to use the year as a partial timestamp on the events and then use either January 1 12:00 or the current datetime for the rest of the timestamp. Is that possible? I've been playing around with TIME_FORMAT trying things like
%Y/1/1:12:00, but I haven't gotten anything to work yet.

0 Karma

woodcock
Esteemed Legend

You can do this but it takes 2 steps and bloats your events. First you use a SEDCMD to modify your timestamp to add month and day. Then you do your normal stuff. Assuming that the first 4 characters are the year, try this:

SEDCMD-add_January_First_at_Noon = s/^(\d{4})/\1\/1\/1:12:00/
0 Karma

maciep
Champion

Not sure if that's possible. Do you have the ability to change the format of that field to include the date you want? Or add other fields for month/day/time that you could use to build the timestamp?

The TIME_FORMAT setting tells splunk how to identify the timestamp in the event, not what to set it to. Since you only have the year field, it obviously won't find the rest of the timestamp you have in there.

0 Karma

cphair
Builder

Technically I could edit the created file, but there are a bunch like this. I don't have the ability to change the source. There's no other date information in the events.

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 ...