Splunk Search

only show 2 decimal places

mileven
Explorer

Currently doing a search and converting results from KB to MB but I only want to see 2 decimal places not 6 as it's currently being shown. Below is my search.

Name: 'Daily-license-usage'
Query Terms: 'index=_internal sourcetype=splunkd source=metrics \"group=per_sourcetype_thruput\" NOT series=\"filetrackercrclog\" NOT series=\"splunk*\" NOT series=\"audittrail\" NOT series=\"scheduler\" NOT series=\"searches\" NOT series=\"stash\" NOT series=\"entity\"| eval events=eps*kb/kbps | stats sum(events) as events sum(kb) as MB by series | eval events=round(events,0) | eval kb=round(kb,1)/1024'

Tags (1)
0 Karma
1 Solution

lguinn2
Legend

At the end of the query put

| eval MB = round(MB/1024,2)

instead of

| eval kb=round(kb,1)/1024' 

View solution in original post

lguinn2
Legend

At the end of the query put

| eval MB = round(MB/1024,2)

instead of

| eval kb=round(kb,1)/1024' 

sowings
Splunk Employee
Splunk Employee

So close! Do the round after the math: |eval kb=round(kb / 1024, 2)

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...