All Projects → draganm → missing-container-metrics

draganm / missing-container-metrics

Licence: MIT license
Prometheus exporter for container metrics cAdvisor won't give you

Programming Languages

go
31211 projects - #10 most used programming language
Dockerfile
14818 projects
shell
77523 projects

Projects that are alternatives of or similar to missing-container-metrics

Talos
Talos is a modern OS for Kubernetes.
Stars: ✭ 2,390 (+1571.33%)
Mutual labels:  containerd
Containerd
An open and reliable container runtime
Stars: ✭ 9,956 (+6862.24%)
Mutual labels:  containerd
Follow Me Install Kubernetes Cluster
和我一步步部署 kubernetes 集群
Stars: ✭ 6,662 (+4558.74%)
Mutual labels:  containerd
lima-gui
Making a GUI for lima VM
Stars: ✭ 36 (-74.83%)
Mutual labels:  containerd
vhive
vHive: Open-source framework for serverless experimentation
Stars: ✭ 134 (-6.29%)
Mutual labels:  containerd
ansible-role-docker arm
Ansible Role - Docker for ARM and Pi
Stars: ✭ 71 (-50.35%)
Mutual labels:  containerd
microk8s-kata-containers
Kata Containers with MicroK8s
Stars: ✭ 32 (-77.62%)
Mutual labels:  containerd
nomad-driver-containerd
Nomad task driver for launching containers using containerd.
Stars: ✭ 152 (+6.29%)
Mutual labels:  containerd
circuit
Container Network Management
Stars: ✭ 43 (-69.93%)
Mutual labels:  containerd
lima
Linux virtual machines, typically on macOS, for running containerd
Stars: ✭ 8,723 (+6000%)
Mutual labels:  containerd
konfigadm
konfigadm is a declarative configuration management tool and image builder focused on bootstrapping nodes for container-based environments.
Stars: ✭ 26 (-81.82%)
Mutual labels:  containerd
CKS-Exercises-Certified-Kubernetes-Security-Specialist
A set of curated exercises to help you prepare for the CKS exam
Stars: ✭ 124 (-13.29%)
Mutual labels:  containerd
amazon-ecs-shim-loggers-for-containerd
Logger shim repository for streaming container logs when using Containerd
Stars: ✭ 35 (-75.52%)
Mutual labels:  containerd
fluentbit-containerd-cri-o-json-log
Parsing CRI JSON logs with Fluent Bit - applies to fluentbit, kubernetes, containerd and cri-o
Stars: ✭ 58 (-59.44%)
Mutual labels:  containerd
ansible-role-containerd
Ansible Role - containerd.io
Stars: ✭ 45 (-68.53%)
Mutual labels:  containerd
amazon-ecr-containerd-resolver-ARCHIVED
The Amazon ECR containerd resolver is an implementation of a containerd Resolver and Fetcher that can pull images from and push images to Amazon ECR using the Amazon ECR API instead of the Docker Registry API.
Stars: ✭ 10 (-93.01%)
Mutual labels:  containerd

Missing Container Metrics - metrics cadvisor won't give you

Docker Pulls Docker Image Version

STATUS: stable, maintained

cadvisor is great, but missing a few important metrics, that every serious devops person wants to know about. This is a secondary process to export all the missing Prometheus metrics:

  • OOM-kill
  • number of container restarts
  • last exit code

This was motivated by hunting down a OOM kills in a large Kubernetes cluster. It's possible for containers to keep running, even after a OOM-kill, if a sub-process got affect for example. Without this metric, it becomes much more difficult to find the root cause of the issue.

True story; after this was deployed, a recurring OOM-kill in Fluentd was quickly discovered on one of the nodes. It turns out that the resource limits were set too low to process logs on that node. Logs were not being forwarded because the Fluentd worker process kept being OOM-kill and then restarted by the main process. A fix was then deployed 10 minutes later.

Supported Container Runtimes

  • Docker
  • Containerd

Kubernetes 1.20 has deprecated Docker container runtime, so we have added support for Containerd since the version 0.21.0 of missing-container-metrics. Both options should cover most of common use cases (EKS, GKE, K3S, Digital Ocean Kubernetes, ...).

Deployment

Kubernetes

The easiest way of installing missing-container-metrics in your kubernetes cluster is using our helm chart.

Docker

$ docker run -d -p 3001:3001 -v /var/run/docker.sock:/var/run/docker.sock dmilhdef/missing-container-metrics:v0.14.0

Usage

Exposes metrics about Docker/Containerd containers. Every metric contains following labels:

Exposed Metrics

Each of those metrics, are published with the labels from the next section.

container_restarts (counter)

Number of restarts of the container.

container_ooms (counter)

Number of OOM kills for the container. This covers OOM kill of any process in the container cgroup.

container_last_exit_code (gauge)

Last exit code of the container.

Labels

docker_container_id

Full id of the container.

container_short_id

First 6 bytes of the Docker container id.

container_id

Container id represented in the same format as in metrics of kubernetes pods - prefixed with docker:// and containerd:// depending on the container runtime. This enables easy joins in Prometheus to kube_pod_container_info metric.

name

Name of the container.

image_id

Image id represented in the same format as in metrics of k8s pod. This enables easy joins in Prometheus to kube_pod_container_info metric.

pod

If io.kubernetes.pod.name label is set on the container, it's value will be set as the pod label in the metric

namespace

If io.kubernetes.pod.namespace label is set on the container, it's value will be set as the namespace label of the metric.

Together with pod, this label is useful in the context of Kubernetes deployments, to determine namespace/pod to which the container is part of. One can see it as a shortcut to joining with the kube_pod_container_info metric to determine those values.

Contributing

Contributions are welcome, send your issues and PRs to this repo.

License

MIT - Copyright Dragan Milic and contributors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].