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!

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 ...