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!

Introducing the Splunk Community Dashboard Challenge!

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

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...

Updated Data Management and AWS GDI Inventory in Splunk Observability

We’re making some changes to Data Management and Infrastructure Inventory for AWS. The Data Management page, ...