Here is a little search macro that does a little more than just converting a value to megabytes - it formats the value depending on its size in GB, MB, KB or bytes. Not usable for chart, but when displaying top-lists it comes quite handy.
The definition looks like this:
if($bytes$>1073741824, tostring(round($bytes$/1073741824,2))+" GB", if($bytes$>1048576, tostring(round($bytes$/1048576,2))+" MB", if($bytes$>1024, tostring(round($bytes$/1024))+" KB", tostring($bytes$)+" Bytes")))
with the argument bytes and can be used like this:
sourcetype=access_combined | stats sum(bytes) as volume by uri | sort -volume | head 10 | eval volume=`format_bytes(volume)`
which would print out smth like:
uri volume
------------------------------------- ---------
/url1 1.54 GB
/url2 656.34 MB
/url3 474.46 MB
/url4 291.72 MB
/url1 62.84 MB
/url1 26.08 MB
...
... View more