Commit Graph

85 Commits

Author SHA1 Message Date
Jordan Liggitt
e24fd90ae9 Move auto-registration to explicit install packages, register plugin interfaces 2019-04-11 13:50:03 +00:00
Jordan Liggitt
f7b509202d Restore manager.New signature, initialization code 2019-04-09 16:59:14 -04:00
Davanum Srinivas
40e6acb3bb
Reorganize code to allow conditional enablement of runtimes
Change-Id: I76583736d7ad39190a1a2bca820d4e957caadc84
2019-04-05 17:37:49 -04:00
Tim Allclair
c492e4a814 Remove CloudProvider SDK dependencies 2019-04-04 10:07:24 -07:00
viberan
7bb8b34a5b add raw_cgroup_prefix_whitelist flag and fix issue #2129 2019-02-17 00:37:42 +02:00
David Ashpole
8240c4af0b
Merge pull request #2103 from WanLinghao/disable-diskio
Add support to disable diskIO metrics
2019-01-15 09:20:04 -08:00
WanLinghao
4eab5b671e Add support to disable diskIO metrics 2019-01-15 09:43:33 +08:00
Mikkel Oscar Lyderik Larsen
c097b20fba Add flag to white list container labels for prometheus metrics (#2113)
Add white_listed_container_labels flag to white list container labels for prometheus metrics

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2018-12-05 11:19:53 -08:00
Tolga HOSGOR
8018ee104b added --url_base_prefix option (#2018)
Some reverse proxies do not support overriding 'Location' header
in 3xx responses. This commit adds a --url_base_prefix option
that adds a prefix to all URLs of cAdvisor so that
redirects go to the correct places.
2018-12-04 09:41:51 +03:00
Davanum Srinivas
4da6d809be
Move from glog to klog
Change-Id: Ic92f57c2d7f268d8d985797974883c1a537d6993
2018-11-08 18:06:28 -05:00
Sashank Appireddy
02ecf721f5 Emit number of processes and file descriptors of a container 2018-10-29 16:55:34 -07:00
David Ashpole
c225d06adf don't emit prometheus metrics that are ignored 2018-07-09 13:17:49 -07:00
Joseph Lorenzini
4bd335b8fd Control whether container labels are exported as prometheus metrics.
when cadvisor exports metrics for docker containers, there is a root cgroup (/) and cgroup for a docker container (/docker/uuid).
If docker container has a label on it, then this label is applied to all containers including the root container.
Because some containers don't have that label, the label will have an empty value. The reason for this is that Prometheus
does not allow sending a metric with the same name, but different labels, so cadvisor uses empty label values based on
the set of all labels for a given metric. This can result in many docker containers getting a large number of empty labels
because another container has that label.

If large number of docker labels vary a lot across images, then the set of labels will be enormous, where most of the labels
will be empty and have no value as prometheus metrics. To avoid this problem, a flag is provided that allows a user to
disable exporting docker labels as metrics.
2018-07-04 10:53:08 -05:00
Andy Xie
ed6521013f add raw container cgroup path prefix whitelist 2018-04-16 12:05:51 +08:00
nielsole
08f0c2397c Adding /proc/<pid>/schedstat (#1872)
Add /proc/<pid>/schedstat metrics for scheduler metrics
2018-03-08 09:27:06 -08:00
Bryan Boreham
ec6da3acae Prometheus metrics: optionally export total CPU instead of per-CPU
Per-CPU stats are more expensive to transport and store, and that
level of detail is not required in many cases.

We export overall total cpu in the same metric as per-cpu, so that
dashboards which previously summed over cpu will work identically.
2018-02-20 13:58:44 +00:00
Tim Allclair
1eb1355ae6
Default logging to V(2) 2017-11-27 19:49:49 -08:00
Tim Allclair
5b435b4b70
Clean up cAdvisor logging 2017-11-27 19:48:05 -08:00
Tristan Colgate
227bb3a79d Add udp and udp6 network statistics 2017-04-10 20:41:51 +01:00
NickrenREN
a248c34528 optimize NewRealSysFs()
remove second return value since it will never return err
2017-03-15 12:11:50 +08:00
David Ashpole
a9b9dbe6be Revert "Merge pull request #1503 from dashpole/configure_root_path"
Undo this commit
This reverts commit 719df516db, reversing
changes made to cae5bfaee6.
2016-10-19 13:47:01 -07:00
David Ashpole
9e47be7bdf Cadvisor allows the RootPath to be configured. The RootPath is used to determine which filesystem is the RootFs. 2016-10-19 10:39:35 -07:00
mwringe
b8b541d86a Update collectors to use a customized httpClient. 2016-07-21 16:00:21 -04:00
Tim St. Clair
4c3454ad6f Inline storageDriver usage & fix error message 2016-05-05 17:13:41 -07:00
Tim St. Clair
85d2668128 Clean up -storage_driver flag
Fix storage driver flag to show all the registered drivers as
options. Result:

```
  -storage_driver driver
                  storage driver to use. Data is always cached shortly
                  in memory, this controls where data is pushed besides
                  the local cache. Empty means none. Options are:
                  <empty>, bigquery, elasticsearch, influxdb, kafka,
                  redis, statsd, stdout
```
2016-05-04 19:26:44 -07:00
Tim St. Clair
c8d9cc16dc Fixes for --disable_metrics flag
1. Fix for writing to nil map when value is non-empty.
2. Fix the usage string: go flag package uses backticks for the flag
name.
3. Render the flag default value in the same format as the flag accepts.
2016-05-02 22:47:37 -07:00
Vishnu kannan
a663e835c4 Fix --disable_metrics parsing to accept empty string as input.
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-04-06 11:52:44 -07:00
Vishnu kannan
e2717d8bb7 Avoid collecting network stats for non root cgroups in raw handler.
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-03-15 12:16:11 -07:00
Seth Jennings
8aa6164192 allow ignoreMetrics in new manager 2016-03-14 17:16:56 -05:00
Allison Richardet
80ba7e7db7 Add the support for kafka in cAdvisor's storage, including output of container id and labels
Addressing PR Feedback

Addressing PR Feedback
2016-01-27 21:33:57 -06:00
Lei Xue
c54f9d3758 make profiling tunable 2015-12-04 18:35:05 +08:00
Lei Xue
dbbe38dfed re-order the import package 2015-11-30 16:43:22 +08:00
mqliang
ce001dcd4e Fix imported package names to not use mixedCaps or under_scores 2015-10-22 12:10:57 +08:00
Vish Kannan
a38832f31f Merge pull request #906 from jimmidyson/prometheus-container-name-to-labels
Registration of custom function to map container name to prometheus labels
2015-10-08 11:46:58 -07:00
Jimmi Dyson
5db9f8674e Registration of custom function to map container name to prometheus labels 2015-10-07 11:30:58 +01:00
Jimmi Dyson
cf43fd2556 Expose git revision as well as version in version info, add Makefile 2015-10-02 10:26:33 +01:00
Piotr Szczesniak
90ca5f9286 Moved max_housekeeping and allow_dynamic_housekeeping flags to cadvisor.go 2015-07-21 20:26:57 +02:00
Johannes 'fish' Ziemke
822d60ba8a Provide cadvisor stats as prometheus metrics 2015-03-11 20:51:06 +01:00
Victor Marmol
d357c34f22 Refactor and centralize HTTP registration. 2015-03-10 18:00:10 -07:00
Victor Marmol
563ead3cce Use mux to register HTTP handlers.
This will allow us to register handlers on the non-default HTTP handler.
2015-03-10 15:37:16 -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
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
Rohit Jnagal
124c08f82a Add a validation handler to check cadvisor's underlying dependencies. 2014-12-15 18:51:00 +00:00
Dipankar Sarkar
d7b01e8994 Added log info for auth and digest file 2014-12-11 23:48:11 +05:30
Dipankar Sarkar
8d3ea25764 Ran gofmt and made the various changes suggested 2014-12-11 23:18:03 +05:30
Dipankar Sarkar
f9b1546367 Cleanup and minor fix for digest 2014-12-11 17:48:08 +05:30
Dipankar Sarkar
6798f193fd Added HTTP Auth and HTTP Digest authentication #302 2014-12-11 17:25:43 +05:30
Victor Marmol
18e9394dbc Adding runtime options docs.
Also some cleanups of other docs.
2014-12-04 09:16:30 -08:00