Comments (8)
So essentially a metric for each Endpoints
object containing a count of all addresses of all EndpointSubset
s. Probably split in ready and non-ready. I think that would be a great candidate for a metric.
from kube-state-metrics.
Can you retrieve that information using the kubernetes API? kube-state-metrics is mainly about converting information that can be requested from the apiserver to the prometheus format. Could you point at where we can find that information in the apiserver?
from kube-state-metrics.
The use case I'm looking for is the following:
I want to make sure that all defined Services have at least one Endpoint that redirects to a running Pod (meaning that they are functional and not broken)
Being broken can be either by misconfiguration, or a failing Pod. The failing pod can be caught by monitoring the Pod, but the misconfiguration is harder to catch.
When profiling the system basically I do kubectl describe service
and see the endpoints it redirects to. Though the information is disperse on Kubernetes API, the above command does GET request to /services
and /endpoints
to collect the necessary info.
You can see that by adding debugging flag (--v=8
) on CLI
kubectl describe svc myservice --v=8
If the information was concentrated as in Deployment
resources on status
section it would be a lot easier to expose that (I'm not sure if there is any pending work on something like that though):
kubectl get deployment mydeployment -o yaml
...
status:
observedGeneration: 4
replicas: 1
unavailableReplicas: 1
updatedReplicas: 1
Though the information for that can be retrieved from /endpoints
directly.
kubectl get endpoints -o yaml
There the name of the endpoint is unique and maps directly to the name of the service. A quick info to extract is the number of addresses attached on the endpoint (each address is one pod). If no addresses exist the service is out-of-order.
Though, I would call those metrics endpoints
metrics for clarity.
from kube-state-metrics.
+1
I think its important to know the number of endpoints, so we can alert in case of 0 endpoints on a service.
so metric of number of endpoints on a service is must.
thanks
from kube-state-metrics.
I'm happy to review if anyone wants to work on this.
from kube-state-metrics.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
Prevent issues from auto-closing with an /lifecycle frozen
comment.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or @fejta
.
/lifecycle stale
from kube-state-metrics.
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
/remove-lifecycle stale
from kube-state-metrics.
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen
.
Mark the issue as fresh with /remove-lifecycle rotten
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close
from kube-state-metrics.
Related Issues (20)
- kube_cronjob_status_active doesn't tell if a cronjob is running HOT 1
- Sharded kube state metrics returns stale metrics HOT 4
- custom metrics for resources w/ group="" broken, e.g. Node HOT 6
- Support metrics for Sidecar containers HOT 2
- Metric with type Gauge throwing errors with no reason. HOT 1
- Need help to troubleshoot/understand issue with KSM pods HOT 2
- Wanted to know the ETA or date for next version release as that has some security vulnerability fixes HOT 3
- Some job metrics are missing if job has no conditions HOT 4
- Duplicate sample for ingress path metrics HOT 2
- Duplicate samples for customResourceState metrics HOT 3
- Support for Gateway API metrics HOT 1
- kube-state-metrics doesn't produce metric for Custom Resources HOT 3
- Version is not applied to the container release binary HOT 2
- Version info missing in v2.13.0 HOT 2
- kube-state-metrics jsonnet format wrong HOT 4
- Use PartialObjectMetadata for ConfigMaps and Secrets HOT 1
- `CustomResourceState` does not produce metrics for the aggregation layer if there is no `CustomResourceDefinition` defined HOT 1
- Add metric(s) for KSM errors HOT 2
- Metric "kube_node_role" missing (AKS) HOT 2
- Amazon Managed Service for Prometheus DataSource not recognized when importing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kube-state-metrics.