Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Metricbeat] support kubernetes ressourcequotas #6659

Closed
f0 opened this issue Mar 26, 2018 · 9 comments
Closed

[Metricbeat] support kubernetes ressourcequotas #6659

f0 opened this issue Mar 26, 2018 · 9 comments
Labels
containers Related to containers use case enhancement good first issue Indicates a good issue for first-time contributors Metricbeat Metricbeat module Team:Integrations Label for the Integrations team v7.5.0

Comments

@f0
Copy link
Contributor

f0 commented Mar 26, 2018

it would be nice if metricbeat would fetch the kubernetes ressourcequotas.
This is very usefull to e.g display quotas per namespace vs. usage per namespace

@ruflin ruflin added enhancement module Metricbeat Metricbeat containers Related to containers use case labels Mar 26, 2018
@exekias
Copy link
Contributor

exekias commented Mar 26, 2018

It make sense to include this info, I've been checking kube-state-metrics and it doesn't retrieve these, so we would need to get them from the API server

@f0
Copy link
Contributor Author

f0 commented Mar 26, 2018

@exekias
Copy link
Contributor

exekias commented Mar 26, 2018

That's right! I didn't see it in the docs, good to know, it should make things easier to implement then 👍

@ruflin ruflin added the Team:Integrations Label for the Integrations team label Nov 21, 2018
@exekias exekias added the good first issue Indicates a good issue for first-time contributors label Jan 28, 2019
@jarrocha
Copy link
Contributor

@exekias @f0
I have taken a look here:
https://github.com/elastic/beats/tree/master/metricbeat/module/kubernetes
and here:
https://github.com/kubernetes/kube-state-metrics/tree/release-1.3/Documentation
Does this involve creating a new state_resourcequotas package as in the first link?

@exekias
Copy link
Contributor

exekias commented Jan 31, 2019

yes, something similar to any of the state_* packages under https://github.com/elastic/beats/tree/master/metricbeat/module/kubernetes

@jarrocha
Copy link
Contributor

jarrocha commented Feb 6, 2019

I'll be working on this one.

@ruflin
Copy link
Collaborator

ruflin commented Feb 7, 2019

@jarrocha Great to hear. Thank you.

@jarrocha
Copy link
Contributor

I have started work on this but there's some information that I am missing. Do you know where I can find more documentation to find usage for the different metric methods as it relates to Prometheus:

This is is from:
https://github.com/elastic/beats/blob/master/metricbeat/module/kubernetes/state_node/state_node.go#L42

"kube_node_info":                            p.InfoMetric(),
"kube_node_status_allocatable_pods":         p.Metric("pod.allocatable.total"),
"kube_node_spec_unschedulable":              p.BooleanMetric("status.unschedulable"),
"kube_node_status_ready":                    p.LabelMetric("status.ready", "condition"),

Also, for testing, will something similar to this work on Linux?
https://github.com/elastic/beats/blob/master/metricbeat/module/kubernetes/_meta/test/README.md

@jsoriano
Copy link
Member

I have started work on this but there's some information that I am missing. Do you know where I can find more documentation to find usage for the different metric methods as it relates to Prometheus:

This is is from:
https://github.com/elastic/beats/blob/master/metricbeat/module/kubernetes/state_node/state_node.go#L42

"kube_node_info":                            p.InfoMetric(),
"kube_node_status_allocatable_pods":         p.Metric("pod.allocatable.total"),
"kube_node_spec_unschedulable":              p.BooleanMetric("status.unschedulable"),
"kube_node_status_ready":                    p.LabelMetric("status.ready", "condition"),

Do you have some specific question about these methods?
Automated godocs can be found here (not sure how updated they are). And you can always check the source in https://github.com/elastic/beats/blob/master/metricbeat/helper/prometheus/metric.go

For examples you can look at the state_* metricsets in the kubernetes module.

Also, for testing, will something similar to this work on Linux?
https://github.com/elastic/beats/blob/master/metricbeat/module/kubernetes/_meta/test/README.md

Yes, for Linux you can also use minikube, you will need to install kube-state-metrics service for these metrics.

If you want to use the docker daemon of the minikube VM you can do it with eval $(minikube docker-env). You may need to use it to pull or build images into the VM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
containers Related to containers use case enhancement good first issue Indicates a good issue for first-time contributors Metricbeat Metricbeat module Team:Integrations Label for the Integrations team v7.5.0
Projects
None yet
Development

No branches or pull requests

6 participants