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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...