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

Export readiness and liveness metrics #699

Closed
okke-formsma opened this issue Mar 13, 2019 · 15 comments
Closed

Export readiness and liveness metrics #699

okke-formsma opened this issue Mar 13, 2019 · 15 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@okke-formsma
Copy link

/kind feature
Currently there is no way to monitor liveness and readiness probe failures using kube-state-metrics. I would very much like to be able to see these for every pod.

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 13, 2019
@brancz
Copy link
Member

brancz commented Mar 15, 2019

The kubelet has the /metrics/probes path, which exposes the results of probes. Given that's where the metrics originate that's also a better place that kube-state-metrics 🙂 .

@fejta-bot
Copy link

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.

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

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 13, 2019
@fejta-bot
Copy link

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

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jul 13, 2019
@fejta-bot
Copy link

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

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

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

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@krish7919
Copy link

The kubelet has the /metrics/probes path, which exposes the results of probes. Given that's where the metrics originate that's also a better place that kube-state-metrics 🙂 .

@brancz Can you please elaborate on this? We are currently using Datadog with our k8s cluster and the dd-agent does not seem to get this metric.

@brancz
Copy link
Member

brancz commented Aug 12, 2019

I know nothing about the datadog agent so I can’t say why. I see them in Prometheus :)

@sravanthi1993
Copy link

I know nothing about the datadog agent so I can’t say why. I see them in Prometheus :)

@brancz: Can you please share how to configure prometheus.yml to get these probe metrics ?

@adamjk-dev
Copy link

+1 @brancz Can you elaborate on how you are finding the liveness/readiness probes via Promtheus? I have the same interest and am not finding the metrics as is. Maybe this depends on the version of k8s/kube-state-metrics/prometheus or the configuration. Thanks!

@sb1975
Copy link

sb1975 commented Jan 14, 2020

/remove-lifecycle stale
/reopen

This is a good requirement which is needed to be available to show on Prometheus Dashboard using Grafana. Couldnt find any Grafana dashboard or Prometheus command to show this.

/help-needed

@k8s-ci-robot
Copy link
Contributor

@sb1975: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

/remove-lifecycle stale
/reopen

This is a good requirement which is needed to be available to show on Prometheus Dashboard using Grafana. Couldnt find any Grafana dashboard or Prometheus command to show this.

/help-needed

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@brancz
Copy link
Member

brancz commented Jan 15, 2020

These metrics already exist on the kubelet endpoint /metrics/probes, which I think is where it belongs.

@purplehat7
Copy link

@brancz What are the metric names in Prometheus that you're seeing?

@janotav
Copy link

janotav commented Nov 9, 2020

@acannon828 and others who might stumble upon this thread searching for the same:

prober_probe_total

@ghost
Copy link

ghost commented Mar 10, 2022

this is a probe sample in prometheus-configmap.yaml:

    - job_name: 'kubelet-probes'
      kubernetes_sd_configs:
        - role: node
      scheme: https
      tls_config:
        ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
      bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
      relabel_configs:
        - action: labelmap
          regex: __meta_kubernetes_node_label_(.+)
        - target_label: __address__
          replacement: kubernetes.default.svc:443
        - source_labels: [__meta_kubernetes_node_name]
          regex: (.+)
          target_label: __metrics_path__
          replacement: /api/v1/nodes/${1}/proxy/metrics/probes

then youcan find prober_probe_total in Prometheus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

10 participants