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!

Enter the Splunk Community Dashboard Challenge for Your Chance to Win!

The Splunk Community Dashboard Challenge is underway! This is your chance to showcase your skills in creating ...

.conf24 | Session Scheduler is Live!!

.conf24 is happening June 11 - 14 in Las Vegas, and we are thrilled to announce that the conference catalog ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...