Commit Graph

85 Commits

Author SHA1 Message Date
Katarzyna Kujawa
738f136b2b
Introduce new machine metrics: (#2519)
* Introduce new machine metrics:
- machine_cpu_cache_capacity_bytes
- machine_node_hugepages_count
- machine_node_memory_capacity_bytes
- machine_nvm_avg_power_budget_watts
- machine_thread_siblings_count

Introduce timestamp for machine related information

Signed-off-by: Katarzyna Kujawa <katarzyna.kujawa@intel.com>
2020-04-29 11:58:23 -07:00
iwankgb
1223982cc4
Using Prometheus testutil in Prometheus tests (#2501)
* Using Prometheus testutil in Prometheus tests

Signed-off-by: Maciej "Iwan" Iwanowski <maciej.iwanowski@intel.com>
2020-04-22 12:55:10 -07:00
Katarzyna Kujawa
7ab5e27909 Add referenced bytes metric for containers
see: https://github.com/brendangregg/wss#wsspl-referenced-page-flag

Signed-off-by: Katarzyna Kujawa <katarzyna.kujawa@intel.com>
2020-04-22 14:05:36 +02:00
iwankgb
d080705029
Perf metrics were exported only if process metrics were (#2502)
* Perf metrics were exported only if process metrics were

Signed-off-by: Maciej "Iwan" Iwanowski <maciej.iwanowski@intel.com>
2020-04-21 12:34:51 -07:00
iwankgb
0dd4098374
golanci-lint based cleanup (#2503)
* Cleanups based on linter

Signed-off-by: Maciej "Iwan" Iwanowski <maciej.iwanowski@intel.com>
2020-04-20 10:53:19 -07:00
Maciej "Iwan" Iwanowski
39ae19d514
Bringing function and regexp names back to original
Signed-off-by: Maciej "Iwan" Iwanowski <maciej.iwanowski@intel.com>
2020-04-17 09:03:13 +02:00
Maciej "Iwan" Iwanowski
d153066bb0
Using constant names for metrics, as Prometheus encourages to
Signed-off-by: Maciej "Iwan" Iwanowski <maciej.iwanowski@intel.com>
2020-04-17 08:51:03 +02:00
Maciej "Iwan" Iwanowski
bf1f3ccbda
Sanitizing perf metrics names and documenting newly added metrics
Signed-off-by: Maciej "Iwan" Iwanowski <maciej.iwanowski@intel.com>
2020-04-16 11:00:35 +02:00
Maciej "Iwan" Iwanowski
95460a3ca6
Fixing silly formatting issue
Signed-off-by: Maciej "Iwan" Iwanowski <maciej.iwanowski@intel.com>
2020-04-16 08:41:23 +02:00
Maciej "Iwan" Iwanowski
f4fec880e7
Exposing perf metrics in Prometheus
Signed-off-by: Maciej "Iwan" Iwanowski <maciej.iwanowski@intel.com>
2020-04-16 08:41:01 +02:00
Davanum Srinivas
94508e8a2f
Switch to klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-04-09 22:54:37 -04:00
Katarzyna Kujawa
921d0824c4
Extending Prometheus metrics by hardware metrics (#2444)
* Extending Prometheus metrics by hardware metrics:
- machine_cpu_physical_cores
- machine_cpu_sockets
- machine_dimm_capacity_bytes
- machine_dimm_count
- machine_nvm_capacity

Signed-off-by: Katarzyna Kujawa <katarzyna.kujawa@intel.com>
2020-04-02 11:43:47 -07:00
Shengjing Zhu
3b75b98f8f Bump github.com/prometheus/client_golang and related
+ github.com/prometheus/client_golang v0.9.1 -> v1.0.0
+ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 -> v0.2.0
+ github.com/prometheus/common v0.0.0-20170220103846-49fee292b27b -> v0.4.1

Sync with the version used in k8s.
Other changes in go.mod is caused by `go mod tidy`
2020-03-20 21:59:21 +08:00
sulixu
b71d99e0ea
Add hugetlb stats (#2420)
* add hugetlb stats, disabled by default
2020-03-19 22:53:59 -07:00
ChenQingya
e49c397a3b refactor AllMetrics to support external reference
Signed-off-by: ChenQingya <qingya.chen520@gmail.com>
2020-03-16 15:38:01 +08:00
sanek9
19dbf410df app_ prefix 2020-02-03 00:33:23 +03:00
sanek9
09f63dbfd2 tests 2020-02-03 00:32:42 +03:00
sanek9
28989ed607 filtering __name__ 2020-02-03 00:31:05 +03:00
sanek9
12fb8718d9 formatting 2020-02-03 00:31:05 +03:00
sanek9
5c5e47c884 after review 1 2020-02-03 00:31:05 +03:00
Alexander Voitov
22c5e624bc export application metrics via /metrics 2020-02-03 00:31:05 +03:00
ChenQingya
43e78242ea split advanced tcp metrics from original tcp metrics as advtcp 2020-01-07 12:04:35 +08:00
ChenQingya
0a9365b238 add advance tcp stats, like netstat -s 2020-01-03 15:25:52 +08:00
Sahil Rihan
a09cdda5cf Add ulimit metrics 2019-12-06 15:38:02 -08:00
qinng
83240cc997 add socket number for process stat (#2260) 2019-07-15 09:33:09 -07:00
Kiel Chan
2ccad4b42f add pids stats (#2257)
Add thread stats
2019-07-03 08:03:53 -07:00
blakebarnett
e8b24bf2e7 Avoid dupe labels in prom metrics (#2194)
Fix panic when container labels conflict in prometheus metrics
2019-06-21 12:57:38 -07:00
luhualin
e88534ca70 fix timestamp error for container_last_seen 2019-01-04 10:12:38 +08:00
luhualin
5c41c694a8 add prometheus metrics timestamp 2018-12-11 11:44:17 +08:00
hangongithub
70b83b9ac4 Ensure tcp6 and udp6 metrics are published via Prometheu (#2102)
add tcp6 and udp6 metrics to the prometheus endpoint

Change-Id: I17bcfee653527fe07d4791019e0e864ca88aeda3
2018-12-07 10:27:46 -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
David Ashpole
e4d403193f remove unused interface method 2018-11-09 09:29:26 -08:00
Davanum Srinivas
4da6d809be
Move from glog to klog
Change-Id: Ic92f57c2d7f268d8d985797974883c1a537d6993
2018-11-08 18:06:28 -05:00
Sashank Appireddy
da29418c31 cache process metrics 2018-11-06 13:29:14 -08:00
Sashank Appireddy
02ecf721f5 Emit number of processes and file descriptors of a container 2018-10-29 16:55:34 -07:00
Sashank Appireddy
e98f28b7c0 Rename extraLabel "type" to "failure_type" for memory_failures_total 2018-09-26 18:25:54 +00:00
David Ashpole
2fa6c624a2
Merge pull request #2034 from usabilla/mapped_file
Adds mapped_file metric
2018-08-29 10:25:29 -07:00
zhangjianweibj
cb8a808089 networkUdpMetrics error if condition 2018-08-15 14:58:02 +08:00
Gijs Kunze
9e175e9ea9 Adds mapped_file metric 2018-08-09 15:14:46 +02:00
Guoliang Wang
910de81342 Check the length before using container.Stats 2018-07-19 13:40:26 +08: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
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
Brian Brazil
27f103b266 Ensure all Prometheus metrics have the same labelnames.
Fixes #1704
2017-11-30 16:33:37 +00:00
Rohit Agarwal
126fb2232e Add accelerator metrics to the API.
The structure is generic to support most hardware accelerators like
GPUs, TPUs etc.

Note that the prometheus label for id is called acc_id, so that it
doesn't conflict with some other label that maybe called id.
2017-11-01 14:41:35 -07:00
Derek Carr
9ea61176bf Expose memory.max_usage_in_bytes in container stats 2017-10-10 17:31:31 -04:00
David Ashpole
1dcd0cee2b update description of memory usage 2017-09-28 10:48:07 -07:00
Jens Bissinger
2599ea6764 Add memory reservation in prom /metrics endpoint. 2017-09-12 19:20:49 +02:00
wujiaxing
8aed6e9cae Add cpu load,tcp\udp usage statistics in prom /metrics endpoint. 2017-06-14 00:54:17 +09:00