Yes, that's possible. The idea around indexing that the dimensions are things you want to be able to group by and drill down on, and metrics are things you want to aggregate. So in your data you can index "host" and "metric" as dimensions but "value" as a metric. The usual way to do an average is to create a "value" metric using the longSum or doubleSum aggregators and "count" metric using the count aggregator, and then at query time, use a division postAggregator to divide the longSum/doubleSum of "value" by the longSum of "count". You can query the average for any interval you like with this approach, including a rolling average over whatever period you like (as long as it is aligned on your granularity).
There is also an approximate histogram aggregator that can also be used to compute percentiles. It's a bit more involved to configure so I would suggest starting out with averages and then working in percentiles if you see value there.