Google cAdvisor (Container Advisor) provides container users an understanding of the resource usage and performance characteristics of their running containers. It is a running daemon that collects, aggregates, processes, and exports information about running containers.
Questions tagged [cadvisor]
159 questions
44
votes
2 answers
Memory usage discrepancy: cgroup memory.usage_in_bytes vs. RSS inside docker container
"Kubernetes" (v1.10.2) says that my pod (which contains one container) is using about 5GB memory. Inside the container, RSS is saying more like 681MiB. Can anypony explain how to get from 681MiB to 5GB with the following data (or describe how to…

burnettk
- 13,557
- 4
- 51
- 52
33
votes
4 answers
How can I alert for container restarted?
I like to monitor the containers using Prometheus and cAdvisor so that when a container restart, I get an alert. I wonder if anyone have sample Prometheus alert for this.

qingsong
- 715
- 3
- 7
- 13
11
votes
6 answers
How to monitor java application memory usage in Docker
I run the java web application on tomcat in the Docker container.
Is there any way to monitor the memory usage of the java application? I try to use jconsole with the process id of the docker, but it tells me Invalidate process id
I also enable JMX…

Browny Lin
- 2,427
- 3
- 28
- 32
10
votes
2 answers
relationship between container_memory_working_set_bytes and process_resident_memory_bytes and total_rss
I'm looking to understanding the relationship of
container_memory_working_set_bytes vs process_resident_memory_bytes vs total_rss (container_memory_rss) + file_mapped so as to better equipped system for alerting on OOM possibility.
It seems against…

Noobie
- 461
- 1
- 12
- 34
9
votes
3 answers
How to get number of pods running in prometheus
I am scraping the kubernetes metrics from prometheus and would need to extract the number of running pods.
I can see container_last_seen metrics but how should i get no of pods running. Can someone help on this?

MAG
- 121
- 1
- 1
- 6
7
votes
2 answers
cAdvisor prometheus integration returns container_cpu_load_average_10s as 0
I have configured Prometheus to scrape metrics from cAdvisor. However, the metric "container_cpu_load_average_10s" only returns 0. I am able to see the CPU metrics under the cAdvisor web UI correctly but Prometheus receives only 0. It is working…

aries
- 849
- 3
- 11
- 24
6
votes
1 answer
Prometheus cAdvisor docker monitoring
I've setup a docker monitoring stack using Prometheus, Grafana and cAdvisor. While using this query to get running containers:
count_scalar(container_last_seen{name=~container1|container2})
It picks up the containers allright, as soon as i launch a…

A.Jac
- 1,443
- 3
- 17
- 24
6
votes
0 answers
Memory and CPU usage definition in docker cadvisor
How can you define the memory usage metric provided by google cadvisor in docker?
Is it dynamic stack size, heap requirement, cache misses, code size, swap memory or RAM memory?
as well for cpu cumulative usage, in which measure unit it is…

staticx
- 1,201
- 2
- 16
- 31
5
votes
1 answer
container_memory_rss relation with node memory used
I'm trying to make sense of container_memory_rss or container_memory_working_set_bytes with respect to node_memory_used i.e (node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes)
Here what I meant
PROMQL 1:
sum(container_memory_rss) by…

Noobie
- 461
- 1
- 12
- 34
5
votes
1 answer
Missing labels in prometheus alerts
I'm having issues with Prometheus alerting rules. I have various cAdvisor specific alerts set up, for example:
- alert: ContainerCpuUsage
expr: (sum(rate(container_cpu_usage_seconds_total[3m])) BY (instance, name) * 100) > 80
for: 2m
labels:
…

dywan666
- 385
- 8
- 14
5
votes
1 answer
Docker stats shows different data compared to cadvisor
I have 2 Docker containers running on Centos machine
for Docker memory monitoring purpose, I have installed "cadvisor" on the machine via Docker images
when I compare "Docker stats" and "cadvisor" value then I see that cadvisor shows more memory…

Devendra
- 185
- 14
5
votes
6 answers
Docker - Prometheus container dies immediately
I have cadvisor running with port mapping 4000:8080 and I have to link it with a container with prometheus.
My prometheus.yml is:
scrape_configs:
# Scrape Prometheus itself every 2 seconds.
- job_name: 'prometheus'
scrape_interval: 2s
…

SegFault
- 2,020
- 4
- 26
- 41
5
votes
1 answer
How can I use Jackson to parse JSON with variable object names?
Google's cAdvisor API gives JSON output like this:
{
/system.slice/docker-13b18253fa70d837e9707a1c28e45a3573e82751f964b66d7c4cbc2256abc266.scope: {},
/system.slice/docker-747f797d19931b4ef33cda0c519f935b592a0b828d16b8cafc350568ab2c1d28.scope:…

jordanpg
- 6,386
- 4
- 46
- 70
4
votes
0 answers
Prometheus CPU Usage Histogram Metrics
my goal is to observe metrics (like CPU, Memory usage etc.) with Prometheus on a server and on its running docker containers. Before sending an alarm, I would like to compare the certain values of those metrics with e.g. an 0.95 quantile. However,…

ilya21
- 41
- 4
4
votes
5 answers
Alert if a docker container stops
I'm monitoring several containers using Prometheus, cAdvisor and Prometheus Alertmanager. What I want is to get an alert if a container goes down for some reason. Problem is if a container dies there is no metrics collected by the cAdvisor. Any…

Christian Will
- 1,529
- 3
- 17
- 25