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!

Introducing the Splunk Community Dashboard Challenge!

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

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...