Giter Site home page Giter Site logo

Comments (8)

brancz avatar brancz commented on August 27, 2024 3

So essentially a metric for each Endpoints object containing a count of all addresses of all EndpointSubsets. Probably split in ready and non-ready. I think that would be a great candidate for a metric.

from kube-state-metrics.

brancz avatar brancz commented on August 27, 2024

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.

dkapanidis avatar dkapanidis commented on August 27, 2024

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.

nleib avatar nleib commented on August 27, 2024

+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.

brancz avatar brancz commented on August 27, 2024

I'm happy to review if anyone wants to work on this.

from kube-state-metrics.

fejta-bot avatar fejta-bot commented on August 27, 2024

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.

fejta-bot avatar fejta-bot commented on August 27, 2024

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.

fejta-bot avatar fejta-bot commented on August 27, 2024

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)

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.