Commit Graph

38 Commits

Author SHA1 Message Date
Jimmi Dyson
041c5af905
Switch to Prometheus decoder 2016-09-22 22:22:07 +01:00
mwringe
b8b541d86a Update collectors to use a customized httpClient. 2016-07-21 16:00:21 -04:00
Tim St. Clair
35f7bc5ee7 Move mocks to testing package to remove +build tags
Some go tools (e.g. godef, gorename) don't handle +build tags well, so
I refactored some packages to remove the test tags from cAdvisor.
2016-07-06 14:15:43 -07:00
Tim St. Clair
81786ec1d2 Fix nil-interface partialFailure bug 2016-05-19 16:16:58 -07:00
Thomas Orozco
2e1f0e2a08 Use a dedicated CpuLoadReader per container
This ensures each goroutine is given its own Netlink connection, and
presumably avoids having a message destined for one goroutine read by
another goroutine.
2016-05-18 09:34:13 +02:00
Tim St. Clair
39fe454f32 Make manager multi-container functions robust to partial failures 2016-05-16 13:25:33 -07:00
Seth Jennings
8aa6164192 allow ignoreMetrics in new manager 2016-03-14 17:16:56 -05:00
Vishnu kannan
36415f465a Support opt out for metrics.
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-02-24 15:57:31 -08:00
Piotr Szczesniak
90ca5f9286 Moved max_housekeeping and allow_dynamic_housekeeping flags to cadvisor.go 2015-07-21 20:26:57 +02:00
anushree-n
e2e193c1fd Add metrics caching 2015-07-20 11:24:20 -07:00
Rohit Jnagal
1a2781819e Separate in-memory cache from storage drivers. 2015-06-02 16:06:01 +00:00
Victor Marmol
bce54ce3f5 Run custom collectors in container housekeeping.
This will allow us to register and run custom collectors for each
container.
2015-05-04 15:57:18 -07:00
Victor Marmol
5fd8273806 Allow customizing storage duration. 2015-04-22 09:43:30 -07:00
Rohit Jnagal
872546ba3a Bulk move current info api to info/v1. Making room for info/v2. 2015-03-04 00:47:28 +00:00
Victor Marmol
7e7c433307 Register container handler factories in manager.New().
This lets us simplify the startup of the manager.
2015-03-02 17:31:20 -08:00
Victor Marmol
99a48d8310 Make explicit the use of InMemoryStorage in Manager.
The current structure is a remnant of when the in memory storage was one
of the options for backing store. Today, we always have the memory
storage with an optional "backend storage" plugin. This commit makes the
InMemoryStorage use explicit.
2015-02-18 14:09:59 -08:00
Rohit Jnagal
2406b6c55b Add derived stats tracking to containers. 2015-02-16 20:44:34 +00:00
Rohit Jnagal
cbdd96a554 Add task load stats to containers.
The stats are only populated when cAdvisor is running outside network namespaces.
We'll add a different backend to retrieve the same data from within namespaces.
2015-01-16 23:25:22 +00:00
Rohit Jnagal
e5200948f5 Add a disk map to machine info.
This is read once at start of cAdvisor. We can use this to report
machine state as well as return logical name for block devices in UI.

Signed-off-by: Rohit Jnagal <jnagal@google.com> (github: rjnagal)
2014-12-17 00:15:50 +00:00
Victor Marmol
181e12dda2 Refactoring and fixes of /docker API endpoint.
This canges the output of the Docker endpoint to be a map so that it is
more consistent from single to multiple returns. It also refactors
internally how we handle both types of requests.

Without this PR the /docker API endpoint is broken completely so this
change in format has no effect anyways.

These changes are tested by the upcoming integration tests.
2014-11-19 03:36:18 -08:00
Victor Marmol
f97e57df88 Simplify how the Docker containers are handled.
This is done by introducting the concept of "namespaces" of container
names. The aliases of a container are under this namespace. Namespace
names are of the form:

//<namespace>/<alias>

This allows us to (within cAdvisor) query all docker containers as
//docker regardless of whether this is a systemd or a non-systemd system.

This does break our ability to handle Docker aliases with the /container
endpoint. I think this is acceptable as our support there was not
consistent between system types.
2014-11-12 18:01:47 -08:00
Victor Marmol
cb80366c6d Fix logic for deciding if Docker container was not found.
This is currently broken for all searches of Docker containers.
2014-10-29 13:32:14 -07:00
Victor Marmol
62b37eca1d Adding --log_cadvisor_usage flag to log the resource usage of cAdvisor.
This helps during performance analysis.
2014-10-15 08:18:38 -07:00
Satnam Singh
8551d376d8 Undo changes to if statements as requested by vmarmol. Fix typos in my changes. 2014-09-24 10:59:18 -07:00
Satnam Singh
bae82a583d A few minor Go style suggestions. 2014-09-24 10:53:52 -07:00
Victor Marmol
e759059a09 Refactor and dependency inject containerData deps 2014-09-22 10:20:54 -07:00
Victor Marmol
9dd8621686 Remove remaining parts of samples and percentiles. 2014-09-15 14:38:51 -07:00
Victor Marmol
42add2409a Removing sampling and percentiles from interface.
Also removing all implementations.
2014-09-15 14:13:07 -07:00
Victor Marmol
41e27e40ef Adding v1.1 remote API.
Main addition is the "subcontainers" resource which provides
ContainerInfo for all subcontainers (recursively and including
self) of the specified container.
2014-08-01 16:17:43 -07:00
Nan Deng
46e0ede568 remove TestGetContainerInfoWithDefaultValue() 2014-07-23 18:13:38 -07:00
Nan Deng
9401d35ce2 gofmt -r "MemoryUsagePercentages->MemoryUsagePercentiles" 2014-07-23 17:58:50 -07:00
Nan Deng
2ac720aa3f remove FillDefaults() 2014-07-23 17:55:25 -07:00
Victor Marmol
1636c3e759 Change ContainerHandlerFactories to decide what containers they support.
This allows a ContainerHandlerFactory to register a CanHandle() function
which is called to determine whether the factory can handle a particular
container.

This commit disables being able to run cAdvisor without lmctfy. This
should be enabled again with a "no-op" global factory which I would like
to do in a separate PR.
2014-07-16 16:48:45 -07:00
Nan Deng
6818ac9b9f gofmt -r "ContainerInfoQuery->ContainerInfoRequest" 2014-07-08 18:04:57 -07:00
Nan Deng
d8e9f8e5a9 gofmt -r "FillWithDefaultValues->FillDefaults" 2014-07-08 17:20:47 -07:00
Nan Deng
f2a0365766 gofmt -r "CpuUsagePercentages->CpuUsagePercentiles" 2014-07-08 17:20:04 -07:00
Nan Deng
d932d351ef test on client library 2014-07-08 12:49:40 -07:00
Nan Deng
4d0b365d43 let users decide how many stats/samples they want to retrieve 2014-07-07 22:04:30 -07:00