Figure 5-10 Prometheus graph Here we can see the overall memory consumption for the whole container, not just the JVM  heap usage. The query in Example 5-6 also displays the current memory usage in GB. Example 5-7 shows a query for viewing the average rate of the current CPU usage of the  same Elasticsearch containers, also providing valuable information about how accurate the  CPU resource allocation is in this cluster. Figure 5-11 on page 170 shows the output of this query for this cluster. Example 5-6 Prometheus query for Elasticsearch pod memory consumption GB Example 5-7 Prometheus query for Elasticsearch pod CPU consumption sum(container_memory_working_set_bytes{pod_name=~"logging-elk-.+",container_name=~ "es-.+|logstash"}) by (pod_name) sum(rate(container_cpu_usage_seconds_total{pod_name=~"logging-elk-.+",container_na me=~"es-.+|logstash"}[2m])) by (pod_name) Chapter 5. Logging and monitoring  169