# Adding Elasticsearch aggregation keys

**URL:** <https://discuss.elastic.co/t/adding-elasticsearch-aggregation-keys/308220>\
**Category:** Elasticsearch\
**Created:** [June 27, 2022, 8:39am UTC](https://discuss.elastic.co/t/adding-elasticsearch-aggregation-keys/308220 "2022-06-27T08:39:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![111505](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111505/32/94191_2.png) [@111505](https://discuss.elastic.co/u/111505)\
**Post date:** [June 27, 2022, 8:39am UTC](https://discuss.elastic.co/t/adding-elasticsearch-aggregation-keys/308220/1 "2022-06-27T08:39:02Z")

</div>

I want to aggregate the CPU values of the PODs in the group. However, if the aggregation API is based on the POD, which POD is shown in the Key, but it is not known which group the POD belongs to.

Is there a way to include a group in the tally? I want to know which POD belongs to which group.  
ex) In the example below, the group information is unknown.

```auto
"buckets": [
{
    "key": "myPod",
    "doc_count": 1,
    "1" : {
        "value" : 5
    }
}]

```

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 28, 2022, 1:07am UTC](https://discuss.elastic.co/t/adding-elasticsearch-aggregation-keys/308220/2 "2022-06-28T01:07:45Z")

</div>

Is the group information in each of your events?

---

<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:** [July 26, 2022, 1:08am UTC](https://discuss.elastic.co/t/adding-elasticsearch-aggregation-keys/308220/3 "2022-07-26T01:08:27Z")

</div>

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