Aggregations on stats api metrics

Usually, when i run "curl -XGET localhost:9200/_nodes/stats" I am getting nodes stats at that particular time. Is there any way that i could get these stats aggregated over last one minute at a granularity of 5 seconds.

Not with ES alone, but have you looked at Marvel?

Yeah, I looked at marvel, it seems, its fetching metrics for every second and storing it in an index and its using that data for aggregations. But fetching metrics every second results in poor performance. So need to fetch metrics once for every minute at a granularity of 5 seconds.