Coder Social home page Coder Social logo

Comments (2)

fawadkhaliq avatar fawadkhaliq commented on May 31, 2024 1

For container level metrics, there are a few ways/tools:

cAdvisor, Kubelet or node summary API

This is the source of truth for most of the data and it will allow tapping into whatever is/will be exposed via these API. However, you would have to directly interact with these components and require a lot of work on top to gather these stats periodically, store them and expose them in a programatic way or graphically. Not recommended.

Grafana Kubernetes App [2]

Uses Intel snap collector [3] to collect stats, comes with a dashboard for container metrics however it does not have a single stable release, is buggy and I am not sure if it is being even actively maintained. Also, there’s no programatic way of getting metrics. Not recommended.

Heapster [4]

Exposes container metrics via API and Grafana dashboards. Supported by the k8s community. Supports latest and historical (using influxdb as sink) metrics both. However, recently Heapster has exploded with unmaintained vendor sinks. Few of the problems with Heapster lead to new API definition for metrics and that is called Metrics API and Metrics Server (see below). Also, Heapster API has been marked for deprecation in favor of the Metrics API.

k8s metrics API and metrics server [5]

k8s metrics API are well defined APIs (not implementation) for metrics and canonical implementation of the metrics API is the metrics server [6]. However, it is recently introduced and historical data is missing currently. Only the latest sample is stored and returned by the metrics API. Not aware of any dashboard integration with metrics API/server yet.

Prometheus [7]

Works well with k8s for monitoring. Supports Grafana dashboard for container level metrics too. Disk io metrics are available in prometheus but not exposed to the Grafana dashboard. Programatic way of getting data from prometheus will require work and its better to interface with an API like Metrics API for this.

Recommendation
————————-
Eventually we should use the Metrics API and its future integrations with dashboards to expose the metrics. However, currently, there are only two options that work and have the metrics we are looking for: Heapster and Prometheus. Both have same set of metrics (coming from the same source of truth). Heapster has an API as well that makes it useful for use cases where plotting is not happening on Grafana. For the fastest approach with minimal work, I’d suggest go with Prometheus and add a Grafana dashboards to expose the additional metrics that are missing.

Heapster usage:
See here: https://github.com/kubernetes/heapster/blob/master/docs/influxdb.md

Prometheus usage
See here: https://github.com/coreos/prometheus-operator/tree/master/contrib/kube-prometheus

[1] "API_URL:API_PORT/api/v1/proxy/nodes/${NODE}:10255/stats/summary"
[2] https://github.com/grafana/kubernetes-app
[3] http://snap-telemetry.io/
[4] https://github.com/kubernetes/heapster
[5] https://kubernetes.io/docs/tasks/debug-application-cluster/core-metrics-pipeline/
[6] https://github.com/kubernetes-incubator/metrics-server
[7] https://github.com/coreos/prometheus-operator/tree/master/contrib/kube-prometheus

from fortio.

ldemailly avatar ldemailly commented on May 31, 2024

This is handled by metrics server and istio etc

from fortio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.