Are you trying to get the average for the previous month or the last ~30 days? For example, are you looking for June or June 16 - July 16? The easiest would be to pick your actual time range from the Time Picker controls.
Taking your examples, you most likely want to do something like you specified: earliest=-1mon latest=now . But make sure this is doing what you want. You are telling Splunk to return the data since June 16th starting at the current time. If instead you want the previous month, you can do this instead: earliest=-1mon@mon latest=@mon . This will search for data between 2019-06-01 00:00:00 and 2019-06-30 23:59:59.
bucket _time span=1mon is not going to do much for you unless your also include the _time in your stats command:
| stats avg(sent_data) as sent_data avg(received_data) as received_data, values(SITE) as SITE by _time, USERNAME
This will round each time stamp down to the first of each month. If you are trying to get the last 30 days, this won't quite do what you want. It will also depend on the time range specified.
... View more