# Metricbeat Docker Module docker.cpu.total.pct service or container?

**URL:** <https://discuss.elastic.co/t/metricbeat-docker-module-docker-cpu-total-pct-service-or-container/212223>\
**Category:** Beats\
**Tags:** docker, metricbeat\
**Created:** [December 17, 2019, 8:20pm UTC](https://discuss.elastic.co/t/metricbeat-docker-module-docker-cpu-total-pct-service-or-container/212223 "2019-12-17T20:20:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![georgezhou](https://avatars.discourse-cdn.com/v4/letter/g/a3d4f5/32.png) [@georgezhou](https://discuss.elastic.co/u/georgezhou)\
**Post date:** [December 17, 2019, 8:20pm UTC](https://discuss.elastic.co/t/metricbeat-docker-module-docker-cpu-total-pct-service-or-container/212223/1 "2019-12-17T20:20:22Z")

</div>

According to [Metricbeat Docker module exported fields](https://www.elastic.co/guide/en/beats/metricbeat/current/exported-fields-docker.html), docker.cpu.total.pct represents the Total CPU usage.

For example, I am running elasticsearch as a docker service with 2 replicas, so docker.container.labels.com\_docker\_swarm\_task\_name would be elasticsearch.1 and elasticsearch.2. The docker.container.labels.com\_docker\_swarm\_service\_name is the same for these two replicas, which is elasticsearch. My question is Does docker.cpu.total.pct gives me the CPU usage of the elasticsearch or individual replicas (elasticsearch.1 and elasticsearch.2)? In the latter case, in order to get the CPU usage of the elasticsearch, I need to aggregate the docker.cpu.total.pct of two replicas(elasticsearch.service.cpu = elasticserach.1.cpu + elasticsearch.2.cpu).

---

<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:** [January 14, 2020, 8:20pm UTC](https://discuss.elastic.co/t/metricbeat-docker-module-docker-cpu-total-pct-service-or-container/212223/2 "2020-01-14T20:20:22Z")

</div>

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