Splunk Search

limit timechart with span and per_hour to 2 decimal values

rajnsoni92
Explorer

I have below query which shows values in line chart with up to 5 decimals and I want to limit it to max 2 decimals.

 

search text .. | eval reqs = 1 | timechart span=24h per_hour(reqs) as AvgReqPerHour

 

 

Labels (1)
Tags (2)
0 Karma

rajnsoni92
Explorer

Thank @etoombs It worked.

0 Karma

etoombs
Path Finder

Add this after your time chart:

| fieldformat AvgReqPerHour= round(AvgReqPerHour,2)

If you don't want the rounding, look at floor or max for the behaviors you want.

Get Updates on the Splunk Community!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...