Open inge4pres opened 5 months ago
@MichaelKatsoulis can you add this one to the weekly review to have a better idea of the effort and check if we could add it to an upcoming iteration ? This is something that could be very useful for MIS.
@MichaelKatsoulis @bturquet is there an update on when this task could be scheduled? It'd be a big win for us to have this level of insights.
Hi @simitt . It is part of our April iteration. Soon someone will be assigned to work on this.
Would it be possible to add one more super useful metric, kube_pod_status_reason
? It encodes pod termination reasons like Evicted|NodeAffinity|NodeLost|Shutdown|UnexpectedAdmissionError
which is otherwise only visible via events.
I know that the metric is marked as experimental but it is available for several years and should be safe to use.
I can also add another ticket if that is preferred.
@StephanErb great suggestion 👍🏼 I believe a dedicated card would be best, thanks 🙏🏼
@MichaelKatsoulis I see this has been postponed, is there a blocker or it's a matter of prioritization?
Hi @inge4pres, @MichaelKatsoulis is on bank holidays and will give more details about priotization when he'll come back. AFAIK there is no blocker but we collated other similar needs in this issue:
And we want to address all these needs at once.
@inge4pres This in the backlog for 8.15. We will start working on it soon!
@inge4pres hello hello my friend !!!
We started looking the addition of CPU throttling metrics from cAdvisor. For the kubernetes side this would need an addition of new metricset because we dont currently make use of cadvisor. So it is a big change and it would require some addtional work from us
BUT ..... Because this response is prometheus we thought that the we can make use of the prometheus integration. And we proved that this can work:
1. Testing in GKE where the container certificates provided are issued from ca trusted authority
Everything works:
2. Testing in local kind k8s cluster where container certificates provided are issued from a non-trusted ca
Because the ca is not trusted, then our connection to cadvisor is getting a 401 unathorised error.
So I have made a draft PR in Prometheus Collector with changes needed here
So with this Prometheus integration also the cadvisor metrics collection works in local clusters.
Let us know if this is an acceptable approach for you and we can merge the integration. FYI Prometheus integration v1.15.3 and kibana.version: "^8.12.1"
The list of container metrics we are collecting from cAdvisor through the kubelet HTTP endpoint is listed here https://github.com/elastic/integrations/blob/b8da31eac0835513745b90cc225e06f0d105fb21/packages/kubernetes/docs/kubelet.md?plain=1#L235-L260
The full list of metrics that cAdvisor exposes through the kubelet node monitoring endpoint is detailed here.
One key metric that is often helpful to troubleshoot performance problems due to CPU overcommittment is
container_cpu_cfs_throttled_seconds_total
, a counter indicating how much time a container process is throttled, parked to make room for other tasks that are also being run in the same node. I am not sure we are already collecting and exposing it.If we aren't, we should add this metric in our monitoring, and encourage its usage. It is the first indicator of resource limits or binpacking mis-configurations happening in the cluster and it's the number 1 cause of performance degradation.
Other relevant metrics that may be helpful from the same data set, and that we are not collecting yet, are:
container_processes
(gauge)container_threads
(gauge)container_oom_events_total
(counter)