Splunk Search

How to reduce the number of decimals in results from 6 digits to 1 digit

puneethgowda
Communicator

Hi all,

I am running below search which is returning 6 decimals for duration, how do i reduce to 1?

example : result returning is 32.708929 and result we need is 32.7

index="pilot_1086_dbconnectinfo" spname="hhv1087_sp_addanotheritembkngdetails" | eval duration=round(duration/1000,1) | eval date=substr(date,1,10) | chart Avg(duration) over date_hour by date | sort  date_hour  | fillnull value=0
0 Karma
1 Solution

puneethgowda
Communicator

below search is working fine i got my answer

index="pilot_1086_dbconnectinfo" spname="hhv1087_sp_addanotheritembkngdetails" | eval duration=round(duration/1000,1) | eval date=substr(date,1,10) | chart eval(round(avg(duration), 1)) AS avg_duration over date_hour by date | sort  date_hour  | fillnull value=0

View solution in original post

0 Karma

puneethgowda
Communicator

below search is working fine i got my answer

index="pilot_1086_dbconnectinfo" spname="hhv1087_sp_addanotheritembkngdetails" | eval duration=round(duration/1000,1) | eval date=substr(date,1,10) | chart eval(round(avg(duration), 1)) AS avg_duration over date_hour by date | sort  date_hour  | fillnull value=0
0 Karma

puneethgowda
Communicator

alt text

0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...