Splunk Search

how to increment a value in eval function

edookati
Path Finder

I need to display the current hour and the current hour + 1 values in the chart and I am using the below eval function for the same...

eval monthDateHour=date_month.".".date_mday." ".date_hour.":"."00"." - "."date_hour+1"

But it doesn't work. Can someone please help me?
Thanks.

Tags (1)
0 Karma
1 Solution

pradeepkumarg
Influencer

You need to remove the quotes around date_hour+1.

eval monthDateHour=date_month.".".date_mday." ".date_hour.":"."00"." - ".(date_hour+1)

View solution in original post

pradeepkumarg
Influencer

You need to remove the quotes around date_hour+1.

eval monthDateHour=date_month.".".date_mday." ".date_hour.":"."00"." - ".(date_hour+1)

edookati
Path Finder

thanks. It worked fine.

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