Commit Graph

90 Commits

Author SHA1 Message Date
Lili Cosic 9d147ca2b6 Adjust unit tests 2021-02-08 13:55:52 +01:00
Illya Chekrygin 4090e8b7aa
Add "uid" label to every pod metric to differentiate between pod instances with the same name.
Signed-off-by: Illya Chekrygin <illya.chekrygin@gmail.com>
2020-11-20 12:26:18 -08:00
Lili Cosic 0b76e7d4f4 internal/store: Rework label allow list for label metrics 2020-11-20 15:31:35 +01:00
Lili Cosic 0f4c5128ec internal/store: Rework label allow list for label metrics 2020-11-18 15:59:19 +01:00
Jimmy K Seto 122f2075c7 fix container resource limits metrics, which got dropped btwn 2.0.0-alpha.1 and 2.0.0-alpha.2 2020-11-03 11:42:57 -05:00
Jimmy K Seto 9078a53265 fix container resource limits metrics, which got dropped btwn 2.0.0-alpha.1 and 2.0.0-alpha.2 2020-11-02 14:48:04 -05:00
Eric Ernst 0cb814f725 pod: add gauge for runtimeclass handler
Add a metric gauge to provide observability for the runtimeclass
used for running a pod.

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2020-10-26 08:03:31 -07:00
Lili Cosic b92fd141c8 Adjust unit tests 2020-10-26 14:04:34 +01:00
Quentin Bisson 7250bc2b5c
Update go module path to k8s.io/kube-state-metrics/v2
Signed-off-by: Quentin Bisson <quentin@giantswarm.io>
2020-09-21 10:58:08 +02:00
vikkyomkar 7d6cfc865f increment expectedFamilies count to 57 2020-07-27 18:22:57 +05:30
vikkyomkar b2fc4e1bab added new metric kube_pod_container_state_started 2020-07-26 11:35:37 +05:30
Frederic Branczyk cd42164e42
internal/store: Add named resource pod overhead metrics
This patch turns the generic pod overhead metrics into one metric per
resource as per Prometheus best practices.
2020-07-16 10:34:52 +02:00
Frederic Branczyk c59d728829
pod_test.go: Fix benchmark expectation 2020-07-15 17:10:22 +02:00
Frederic Branczyk 98572212e8
internal/store: Add named init container resource request/limit metrics
This patch returns named resource request and limit metrics for well
known resources for init containers, but keeps the generic metric as an
extension mechanism.
2020-07-15 15:38:13 +02:00
Frederic Branczyk 4129feb3cc
internal/store: Add named resource limit metrics
This patch returns named resource request metrics for well known
resources, but keeps the generic metric as an extension mechanism.
2020-07-15 15:09:31 +02:00
Frederic Branczyk 584f7de830
internal/store: Add named resource request metrics
This patch returns named resource request metrics for well known
resources, but keeps the generic metric as an extension mechanism.
2020-07-15 14:59:19 +02:00
qw1mb0 bdb2e9284e add UnexpectedAdmissionError to kube_pod_status_reason metric 2020-05-16 21:19:25 +03:00
Frederic Branczyk 1610b64df8
pod: Add init container requests 2020-04-15 22:03:27 +02:00
Rustam Zagirov b61a3b320a add host_network to kube_pod_info 2020-03-18 21:23:37 +03:00
Olivier Lemasle 6fac7a2ddd Rename kube_pod_deleted to kube_pod_deletion_timestamp 2020-02-24 11:32:59 +01:00
Kubernetes Prow Robot 9216f8bb15
Merge pull request #1050 from clamoriniere/feature/removeKubectlLogic
[Pod] remove kubctl logic in kube_pod_status_phase
2020-02-12 10:48:52 -08:00
Kubernetes Prow Robot a618eab33d
Merge pull request #1053 from egernst/overhead
pod: add gauges for pod overhead
2020-02-10 11:11:54 -08:00
Eric Ernst c1895cdec3 pod: add gauges for pod overhead
Add a metric guage to provide observability for the overhead associated
with running a pod.

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2020-02-07 22:15:36 -08:00
Philip Gough 58e7c50270
store: Remove non-identifying labels from pod metrics
Fixes #979

test:store - Updates unit test to reflect removal of 'node' name from labels

test: Update main_test for removal of node label from pod metrics
2020-02-07 14:00:16 +00:00
cedric lamoriniere e78ed797a4 [Pod] remove kubctl logic in kube_pod_status_phase
As explained in the doc: "kube-state-metrics exposes raw data
unmodified from the Kubernetes API".

The goal of this change was to remove the kubctl logic introduced to
get the `Unknown` phase in `kube_pod_status_phase` metric.

With the introduction of `kube_pod_deleted` metric, it is now possible
to get the same result with a promQL query. (more info in this #1013).

Signed-off-by: cedric lamoriniere <cedric.lamoriniere@datadoghq.com>
2020-02-06 09:52:25 +01:00
cedric lamoriniere 311c6821c1 update pod metrics docs after review
Signed-off-by: cedric lamoriniere <cedric.lamoriniere@datadoghq.com>
2020-02-05 21:40:43 +01:00
cedric lamoriniere 0650fd1271 update doc with new pod's metrics and fix benchmark
Signed-off-by: cedric lamoriniere <cedric.lamoriniere@datadoghq.com>
2020-02-05 19:05:24 +01:00
cedric lamoriniere 8f45cd8444 Add kube_pod_deleted and kube_pod_status_reason
Aim of this PullRequest is to add several new pod metrics:
- kube_pod_deleted: Unix deletion timestamp
- kube_pod_status_reason: The pod status reasons (NodeLost, Evicted)
These new metrics can be used to determine the `pod.status.phase`
displayed by `kubectl`: Running, Terminated, Unknown…
It will allow removing the `kubectl` display logic added previously
to compute the “Unknown” phase.

Signed-off-by: cedric lamoriniere <cedric.lamoriniere@datadoghq.com>
2020-02-05 18:55:21 +01:00
yeya24 da2dadcd3e remove deprecated metrics
Signed-off-by: yeya24 <yb532204897@gmail.com>

remove deprecated options

Signed-off-by: yeya24 <yb532204897@gmail.com>
2020-02-05 08:48:23 -05:00
cedric lamoriniere 72ad3cb412 Remove FamilyByteSlicer interface
- To allow other external Stores, remove the `FamilyByteSlicer` interface
  and give access directly to `metric.Family`.
- Move functions present in `pkg/metric/generator.go` to a dedicated package
  `generator` in `pkg/metric_generator/generator.go`.

Signed-off-by: cedric lamoriniere <cedric.lamoriniere@datadoghq.com>
2019-12-13 10:50:19 +01:00
rmartinez3 e818d5af0c adding Evicted to reasons terminated
adding evict reason to pod_test

adding to main_test evicted reason metrics
2019-11-26 12:54:58 -06:00
Tariq Ibrahim 1b42e7c450
lint: enforce goimports local prefixes 2019-08-20 10:33:05 -07:00
pigletfly c37f9ae305 feat: add kube_pod_status_unschedulable metric 2019-08-09 23:31:42 +08:00
Lili Cosic a052ae2664 internal/store/pod_test.go: Update benchmark test 2019-07-31 17:36:36 +02:00
Lili Cosic 523fee72cb internal/store/pod_test.go: Enable metric 2019-07-26 13:58:11 +02:00
Lili Cosic e34157533f docs,internal: Remove kube_pod_init_container_resource_requests
This metric is not longer being created.
2019-07-26 13:55:19 +02:00
Lili Cosic 684293930a internal/store/*: Enable metric headers in tests 2019-07-26 13:31:20 +02:00
Clayton Coleman a02f1bc874
pods: Add pod_restart_policy metric
Report pod_restart_policy{...,type="Always|OnFailure|Never"} 1 for the
pod.spec.restartPolicy which allows an admin to know how many batch vs
service workload pods are running on the cluster.
2019-07-23 16:10:07 -04:00
Andrey Sidorov 5ae00bb93f add kube_*_annotations metrics for all objects 2019-06-25 22:29:27 +03:00
Lili Cosic 68aea02d26 Makefile,internal/collector: Rename collector -> store
Since the removal of collector, this introduces both the concept of the
store and the resources instead of collectors that the user passes in.

The user facing logs and flags were not changed as that would be a
regression.
2019-06-11 16:18:53 +02:00