Splunk Search

How to add hours to _time for specific events using eval?

kevinjacks
Explorer

I need to add 3 hours to records which have SITE=1 and not change anything for other sites.

I started with this, but I can't figure out how to incorporate that into an IF statement.

| eval _time=_time+10800
Tags (3)
0 Karma
1 Solution

dkoops
Path Finder

This should probably work:

| eval _time=if(SITE==1, _time+10800, _time)

View solution in original post

dkoops
Path Finder

This should probably work:

| eval _time=if(SITE==1, _time+10800, _time)

kevinjacks
Explorer

worked perfect, thank you!

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