<p>For example, kubelet(cAdvisor) <code>container_cpu_usage_seconds_total</code> has value with some parameter (e.g. pod, namespace).</p>

<p>I wonder how to summarize this kind of values into Service(for example, CPU usage per service)? I understand that Service is a set of pods so that just aggregating these values per pod to service, but I do not know how?</p>

<p>Is there any aggregation method to Service?  Or, <code>process_cpu_seconds_total</code> is a kind of aggregated value per service of 'container_cpu_usage_seconds_total'?</p>

<p>Thank you for your help!</p>

Fumisky Wells
<p>What about</p>

<pre><code>sum(rate(container_cpu_usage_seconds_total{job="kubelet", cluster="", namespace="default", pod_name=~"your_pod_name.*"}[3m]))
</code></pre>

<p>Taken from <a href="https://github.com/kubernetes-monitoring/kubernetes-mixin" rel="nofollow noreferrer">kubernetes-mixin</a></p>
