Commit Graph

197 Commits

Author SHA1 Message Date
Davanum Srinivas
40e6acb3bb
Reorganize code to allow conditional enablement of runtimes
Change-Id: I76583736d7ad39190a1a2bca820d4e957caadc84
2019-04-05 17:37:49 -04:00
WanLinghao
4eab5b671e Add support to disable diskIO metrics 2019-01-15 09:43:33 +08:00
Davanum Srinivas
4da6d809be
Move from glog to klog
Change-Id: Ic92f57c2d7f268d8d985797974883c1a537d6993
2018-11-08 18:06:28 -05:00
William Zhang
7961198a0c fix spelling errors
Signed-off-by: William Zhang <zhang.wanmin@zte.com.cn>
2018-09-28 15:49:25 +08:00
David Ashpole
c225d06adf don't emit prometheus metrics that are ignored 2018-07-09 13:17:49 -07:00
Antonio Murdaca
42eeba5783
container: fix concurrent map acccess
GetSpec() can be called concurrently in
manager/container.go.updateSpec()
results into a concurrent map access on the labels map because we're
directly updating the map inside GetSpec(). The labels map from the
container handler is not a copy of the map itself, just a reference,
that's why we're getting the concurrent map access.
Fix this by moving the label update with restartcount to the handler's
initialization method which is not called concurrently.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2018-06-13 19:06:47 +02:00
David Ashpole
e1d602d7af create libcontainer handler for common code 2018-02-21 08:53:42 -08:00
David Ashpole
c094ef0d2a
Merge pull request #1859 from andyxning/reduce_labels_for_container_info
reduce labels for container info
2018-02-21 08:33:17 -08:00
David Ashpole
6116f26530
Merge pull request #1882 from dashpole/overlay_upper
monitor only the upper directory for overlay
2018-02-08 11:18:43 -08:00
James Ravn
e660d8b8b7 Retry docker status on startup
For https://github.com/google/cadvisor/issues/1866.
2018-02-06 10:31:11 +00:00
David Ashpole
812cc819ac monitor only the upper directory for overlay 2018-02-05 15:49:27 -08:00
Andy Xie
1ccbe6fdd0 reduce labels for container info 2018-01-12 00:14:01 +08:00
David Ashpole
9ffa37396f
Merge pull request #1806 from sentinelt/master
fix #1607; use container creation time provided by Docker handler
2017-12-20 11:25:35 -08:00
James Ravn
57e17d8be2 Add timeouts for docker queries
As these can otherwise block indefinitely due to docker issues.

This is to fix https://github.com/kubernetes/kubernetes/issues/53207,
where kubelet relies on cadvisor for gathering docker information as
part of its periodic node status update.
2017-12-05 13:50:48 +00:00
Tim Allclair
5b435b4b70
Clean up cAdvisor logging 2017-11-27 19:48:05 -08:00
Sławek Piotrowski
2648be083a fix #1607; use container creation time provided by Docker handler 2017-11-16 00:41:10 +01:00
David Ashpole
b7959da460 monitor diff directory for overlay2 2017-10-11 14:13:42 -07:00
David Ashpole
888a529088 fix #1743; move off of docker/engine-api 2017-09-28 11:05:13 -07:00
Karl
5a033c064e Add runtime options for TLS support 2017-08-24 15:14:33 +02:00
David Ashpole
96b603e20a Merge branch 'master' into overlay2 2017-05-31 14:05:54 -07:00
David Ashpole
de308101e4 Merge branch 'master' into container-restart-count 2017-05-30 11:33:39 -07:00
Ricardo Pchevuzinske Katz
f5a896ef4c Gather information from RestartCount counter and put into labels 2017-05-30 14:05:14 -03:00
Andy Goldstein
69c085d9fa Cache the Docker thin pool name
Cache the Docker thin pool name in the dockerFactory and pass it to each Docker container handler,
instead of calling `docker info` each time a new container handler is created, as the thin pool name
is extremely unlikely to change.
2017-05-30 11:50:58 -04:00
Clayton Coleman
4e25a7951f
Report container FS metrics into prometheus /metrics
PerDiskStats reported from cgroups were not being surfaced into
prometheus. In order to properly correlate the metrics, we need to
assign a device label to each metric (which is the FS or device path).
Since blkio cgroup tracks devices, we create a synthetic device
`/dev/NAME` for the metric.

Assign a Device label to each PerDiskStat for the handlers up front, and
then surface the PerDiskStat values into the prometheus metrics. Report
two new metrics - total bytes read and total bytes written.
2017-04-24 20:46:55 -04:00
Bilal Amarni
e0c8ec569d [docker] add overlay2 storage driver
Signed-off-by: Bilal Amarni <bilal.amarni@gmail.com>
2017-04-13 13:39:45 +02:00
Manjunath A Kumatagi
8fb1158353 Add Docker API version 2017-04-04 10:56:11 +05:30
Brian Akins
feecd47daa Add watcher for zfs similar to devicemapper
minor cleanup

ensure we look at parent dataset for limit, etc
2017-03-15 18:31:11 -04:00
Derek Carr
b172ba65b4 disable thin_ls due to excessive iops 2017-02-09 10:29:58 -05:00
Calum Lacroix
6d67091c8b Checks for successful string split on env variable 2017-02-08 22:39:34 +00:00
Calum Lacroix
967e09a3a5 Checks environment variables for empty strings
If an environment variable is an empty string, cadvisor panics and fails to start
2017-02-08 18:44:56 +00:00
Derek Carr
4ad5c58f6a Ignore any .mount cgroup in docker handler 2017-01-16 11:02:37 -05:00
David Ashpole
9fdeefe3e4 Cadvisor now publishes per-container inode stats using the command 'find . -xdev printf '.'| wc -c' this is published in the v2 api using a new field 2016-10-12 13:16:21 -07:00
Andy Goldstein
2b525ff87e Ensure minimum kernel version for thin_ls
Ensure that kernel >= 4.4.0 or RHEL/Centos 7 kernel >= 3.10.0-366 exists before starting the thin
pool watcher. Prior versions have a bug in which reserving and releasing the metadata snapshot can
cause thin pool corruption.
2016-08-04 16:14:40 -04:00
Andy Goldstein
d05098b314 Lower ThinPoolWatcher cache miss log level 2016-07-23 07:07:42 -04:00
Matt Wringe
213c254bb7 Add in the ability to expose the ip address of a container. 2016-07-13 13:58:43 -04:00
Seth Jennings
eafff745a5 only fail fs stat gather if metadata device not found 2016-06-21 16:05:37 -05:00
Paul Morie
c37d048e1b Check for thin_ls binary in path when using ThinPoolWatcher 2016-06-14 13:19:05 -04:00
Tim St. Clair
3fbe18de9a Merge pull request #1204 from pmorie/dm-support
devicemapper thin_ls support
2016-05-18 12:30:05 -07:00
Paul Morie
647224c95a Add devicemapper support for docker containers 2016-05-18 15:19:20 -04:00
Shaya Potter
6fa3687720 Polling rkt implementation of new watcher inteface (#1284)
polling rkt implementation of new watcher inteface
2016-05-17 10:34:56 -07:00
Shaya Potter
e02632463b Refactor container watching out of raw handler into its own inteface / package 2016-05-11 20:27:10 -07:00
Tim St. Clair
8404284c42 Merge pull request #1274 from timstclair/container
Delete unused ListThreads container method
2016-05-09 11:59:28 -07:00
Tim St. Clair
d1868287db Clean up docker root dir 2016-05-06 19:31:36 -07:00
Tim St. Clair
4c506006f2 Don't validate docker state file, since it's no longer used 2016-05-06 19:29:24 -07:00
Tim St. Clair
019bfaecc7 Delete unused ListThreads container method 2016-05-06 13:45:29 -07:00
Tim St. Clair
4d3ef349fb Move utils/machine -> machine 2016-05-02 15:56:49 -07:00
Tim St. Clair
f365c6a115 Move docker types to v1 API 2016-05-02 15:52:29 -07:00
Tim St. Clair
0c89fd1b71 Refactor docker-specific functions from manager to docker 2016-05-02 12:24:31 -07:00
Lantao Liu
ece4c555cc switch to the new engine-api 2016-04-25 19:22:05 -07:00
Tim St. Clair
9790a0d3f4 Fix docker GetSpec to include image, labels, and env vars 2016-04-15 15:34:24 -07:00