Splunk Search

How do I change the value of a search to MB?

marcusmartin
Path Finder

I have this search which shows the total of bytes coming in for a particular time period. Can someone tell me how to change the search so i can have the value changed to MB? I understand i should maybe be using the eval function but, try as i might, i can't seem to get the output i want.

sourcetype="microsoft:forefront:tmg:proxy" | stats Sum(sc_bytes) 
Tags (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

To convert bytes to MB, divide by 1024 twice.

sourcetype="microsoft:forefront:tmg:proxy" | stats Sum(sc_bytes) as sum_bytes | eval sum_MB=sum_bytes/1024/1024

---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

To convert bytes to MB, divide by 1024 twice.

sourcetype="microsoft:forefront:tmg:proxy" | stats Sum(sc_bytes) as sum_bytes | eval sum_MB=sum_bytes/1024/1024

---
If this reply helps you, Karma would be appreciated.
0 Karma

marcusmartin
Path Finder

Oooooooh I was so close, I had all the words just in the wrong order 🙂 thanks so much. Just need to truncate it now

0 Karma
Get Updates on the Splunk Community!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...