cadvisor
kube-state-metrics
Our great sponsors
cadvisor | kube-state-metrics | |
---|---|---|
44 | 33 | |
16,204 | 5,026 | |
1.3% | 1.8% | |
8.0 | 8.9 | |
1 day ago | 7 days ago | |
Go | Go | |
GNU General Public License v3.0 or later | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
cadvisor
-
List of your reverse proxied services
cAdvisor
-
Prometheus JMX Exporter for Java17
For CPU and memory metrics, you can use cAdvisor to collect container level data.
- How to monitor container exit codes?
-
Building a realtime performance monitoring system with Kafka and Go
We could have used a much more focussed tool like Prometheus or Cadvisor to gather system stats, but that is not the main objective of this article.
-
Looking for an open source monitoring solution that will capture specific process info
If you're running things under systemd, you can enable process accounting and use cAdvisor.
-
Kubernetes Monitoring: Strategy, Best Practices, and Tools to Use
Container Advisor (cAdvisor) is an open-source metrics collection agent specifically built for containers. This solution runs at a node level, since it comes integrated with the kubelet service as one of the binaries. cAdvisor gathers data on CPU usage, memory usage, network status, and storage for every live container, helping administrators gain insight into machine-level performance metrics.
-
How to monitor the network usage of docker containers
That said, cadvisor should work great. You'd want to have prometheus scrape those metrics. In particular you'd probably be interested in container_network_receive_bytes_total and container_network_transmit_bytes_total. Reference: https://github.com/google/cadvisor/blob/master/docs/storage/prometheus.md
-
Métricas cAdvisor no Kubernetes com Prometheus e Grafana
cAdvisor é um agente de monitoramento para containers e tem suporte nativo ao Docker.
-
9 Tools Every Platform Engineer Should Know
cAdvisor, an observability tool, has made monitoring containers easy. It gives users insight into the resource consumption and performance aspects of their running containers. cAdvisor is an open-source running daemon that aggregates processes and exports information about containers that are running. It saves resource isolation settings, historical resource consumption, histograms of total historical resource usage, and network data for each container. This information is exported by container as well as machine-wide.
-
Metrics for OOM kills
cAdvisor: container_oom_events_total
kube-state-metrics
- Do we have any Prometheus metric to get the kubernetes cluster-level CPU/Memory requests/limits?
-
Prometheus node exporter and cadvisor to send metrics to central prometheus cluster
Those are entirely different types of data. You can get that from something like kube-state-metrics
-
Questions about Kubernetes
Kubernetes itself will not notify you, the way I've seen people do this, is to use something like kube-state-metrics or node_exporter, export that to Prometheus (or preferrably VictoriaMetrics because Prometheus is terrible IMO), and then setup alarms on that with alertmanager or equivalent, or just look at dashboards regularly with Grafana. Realistically I recommend only setting alerts on disk usage and application/database latency. CPU and memory utilization isn't a great metric to alert on a lot of the time.
-
Observability-Landscape-as-Code in Practice
We then have various other Metrics called Kubernetes Workload Metrics. These are the dashboards with names that start with “Kubernetes / Compute Resources / Workload”. These dashboards are specific to the services you are running. They take into account the Kubernetes Workloads in your various namespaces, using kube-state-metrics. For a closer look, check out otel_demo_app_k8s_dashboard.tf.
-
Kubernetes Costs: Effective Cost Optimization Strategies To Reduce Your k8s Bill
The first step to optimizing costs is gaining visibility into your costs using tools. Kubernetes provides a Metrics Server and kube-state-metrics that can give you the overall picture of resource utilization by your cluster. There are more tools that provide more granular breakdowns and provide dashboards with business metrics, infra cost, and alerting functionalities. Here are some strategies to optimize your resource utilization and cloud bills on k8s.
-
Namespace pods accounting
If you have the kube-state-metrics + Prometheus with a sufficiently long retention time, then you could write a PromQL query based on the "kube_pod_created" metric to get the answer to your question. It might be possible with the metrics-server + Prometheus, but I think it would not count some pods that live less than one scrape interval.
- Métricas cAdvisor no Kubernetes com Prometheus e Grafana
-
Kubernetes' Native Metrics and States
There is, also developed by k8s team, the kube-state-metrics, a service that listens to the Kubernetes API server and generates metrics about the state of the objects such as deployments, nodes, and pods.
-
7 essential Kubernetes GitHub Projects you should know about 🔥🚀
2. kube-state-metrics
- I just passed the CKA!! Here are some tips (2022)
What are some alternatives?
node_exporter - Exporter for machine metrics
Netdata - Monitor your servers, containers, and applications, in high-resolution and in real-time.
metrics-server - Scalable and efficient source of container resource metrics for Kubernetes built-in autoscaling pipelines.
Zabbix - Real-time monitoring of IT components and services, such as networks, servers, VMs, applications and the cloud.
Portainer - Making Docker and Kubernetes management easy.
prometheus - The Prometheus monitoring system and time series database.
Healthchecks - Open-source cron job and background task monitoring service, written in Python & Django
php-fpm_exporter - A prometheus exporter for PHP-FPM.
Grafana - The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
docker-socket-proxy - Proxy over your Docker socket to restrict which requests it accepts
k3s - Lightweight Kubernetes
kubespray - Deploy a Production Ready Kubernetes Cluster