Commit Graph

15 Commits

Author SHA1 Message Date
Mike Brown
879b2ae291 allow idempotence when adding a task to cgroup metrics collection
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2018-10-18 01:32:56 -05:00
Michael Crosby
da1b5470cd Runtime v2
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2018-07-17 10:21:29 -04:00
Kunal Kushwaha
b12c3215a0 Licence header added
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2018-02-19 10:32:26 +09:00
Stephen J Day
77e5f6553c
metrics/cgroups: handle error on call to cgroup
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-10-06 15:51:20 -07:00
Michael Crosby
d92f6eea1f Allow blocking and non-blocking metrics collection
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-10-06 12:05:56 -04:00
Mathieu Pasquet
ed519bb5ce Collect cgroup stats one last time before exit
This commit adds a collection step in the Stop() task handler which will
retrieve the metrics available for this container at that time, and
store them until the next prometheus Collect() cycle.

This allows short-lived containers to be visible in prometheus, which
would otherwise be ignored (for example, running containerd-stress would
show something like 2 or 3 containers in the end, while now we can see
all of them). It also allows for more accurate collection when
long-running containers end (for example CPU usage could spike in the
last few seconds).

A simple case illustrating this with cpu usage would be:

  ctr run -t --rm docker.io/library/alpine:latest mycontainer sh -c 'yes > /dev/null & sleep 3 && pkill yes'

Signed-off-by: Mathieu Pasquet <mathieu.pasquet@alterway.fr>
2017-10-06 15:40:38 +02:00
Michael Crosby
451421b615 Comment more packages to pass go lint
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-10-02 13:54:56 -04:00
Michael Crosby
72bcdb8fa9 Add config for exporting container metrics to prom
This adds an option for the cgroups monitor to include container metrics
in the prometheus output.  We will have to use the plugin to emit oom
events via the events service but when the `no_prom` setting is set for
the plugin container metrics will not be included in the prom output.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-09-07 13:40:55 -04:00
Michael Crosby
2ed3c62e27 Update cgroups to 5933ab4dc4f7caa3a73a1dc141bd11f4
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-09-06 16:20:19 -04:00
Michael Crosby
ed45952826 Use cgroups proto for prom metrics
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-09-05 17:26:26 -04:00
Michael Crosby
b04e408a4b Convert OOM Metric to Const
This converts the oom metric to be a const metric so that deleted tasks
do not fill up the metric labels.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-09-01 16:43:30 -04:00
Andrew Pennebaker
1d2a079f08
update to github.com/sirupsen/logrus v1.0.0
Signed-off-by: Andrew Pennebaker <apennebaker@datapipe.com>
2017-07-21 15:39:14 -07:00
Michael Crosby
cfcea71ab0 Update windows and darwin for spec changes
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-27 13:20:55 -07:00
Michael Crosby
6ec84ef83c Add namespace to container metrics
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-27 11:54:14 -07:00
Michael Crosby
85f61f6f51 Move cgroups prom to containerd metrics
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-27 11:45:05 -07:00