# How to quickly determine the % of growth over time by index type / is it possible to do aggregations in sense against the \_cat API?

**URL:** <https://discuss.elastic.co/t/how-to-quickly-determine-the-of-growth-over-time-by-index-type-is-it-possible-to-do-aggregations-in-sense-against-the--cat-api/70736>\
**Category:** Elasticsearch\
**Created:** [January 5, 2017, 10:44pm UTC](https://discuss.elastic.co/t/how-to-quickly-determine-the-of-growth-over-time-by-index-type-is-it-possible-to-do-aggregations-in-sense-against-the--cat-api/70736 "2017-01-05T22:44:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casieowen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/casieowen/32/8734_2.png) [@casieowen](https://discuss.elastic.co/u/casieowen)\
**Post date:** [January 5, 2017, 10:44pm UTC](https://discuss.elastic.co/t/how-to-quickly-determine-the-of-growth-over-time-by-index-type-is-it-possible-to-do-aggregations-in-sense-against-the--cat-api/70736/1 "2017-01-05T22:44:39Z")

</div>

Hi,

We've run into a scenario where our data disk space usage has increased drastically in a short period of time. We've determined that the increase is due to data we're indexing (the pattern and trend for indices.store.size\_in\_bytes by node is inversely correlated with the fs.data.available\_in\_bytes by node). We'd like to be able to quickly determine the % of growth over time by index type. So, let's say we have these indices per day:

indexA\_date1  
indexA\_date2  
indexA\_date3  
. . .  
IndexB\_date1  
IndexB\_date2  
IndexB\_date3

I'd like to be able to get the sum of the indices.store.size by index type (so would need to be able to specify indexname="IndexA\*" (to get for all dates) over time. What would be the best way to do that?

I tested to see if I could do an agg on the \_cat API with the below -- not knowing ahead of time if it was even possible -- but got "IndexMissingException[[\_cat] missing]"  
GET \_cat/indices  
{  
"aggs": {  
"biggest\_indices": {  
"max": {  
"field": "store.size"  
}  
}  
}  
}

I also tried in Kibana, but do not see a way to make that work. We got close to what we want with the below, but, again, we'd would like it by \<index\*\> instead of by node:

{  
"type": "line",  
"params": {  
"shareYAxis": true,  
"addTooltip": true,  
"addLegend": true,  
"showCircles": true,  
"smoothLines": false,  
"interpolate": "linear",  
"scale": "linear",  
"drawLinesBetweenPoints": true,  
"radiusRatio": 9,  
"times": [],  
"addTimeMarker": false,  
"defaultYExtents": false,  
"setYExtents": false,  
"yAxis": {}  
},  
"aggs": [  
{  
"id": "1",  
"type": "avg",  
"schema": "metric",  
"params": {  
"field": "indices.store.size\_in\_bytes"  
}  
},  
{  
"id": "2",  
"type": "date\_histogram",  
"schema": "segment",  
"params": {  
"field": "@timestamp",  
"interval": "m",  
"customInterval": "2h",  
"min\_doc\_count": 1,  
"extended\_bounds": {}  
}  
},  
{  
"id": "3",  
"type": "terms",  
"schema": "group",  
"params": {  
"field": "[node.name](http://node.name)",  
"size": 15,  
"order": "desc",  
"orderBy": "1"  
}  
}  
],  
"listeners": {}  
}

Any ideas?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 2, 2017, 10:44pm UTC](https://discuss.elastic.co/t/how-to-quickly-determine-the-of-growth-over-time-by-index-type-is-it-possible-to-do-aggregations-in-sense-against-the--cat-api/70736/2 "2017-02-02T22:44:40Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
