Skip to content

Expose PVC metrics via kubelet prometheus#51553

Merged
k8s-github-robot merged 1 commit intokubernetes:masterfrom
wongma7:pvc-prometheus
Sep 3, 2017
Merged

Expose PVC metrics via kubelet prometheus#51553
k8s-github-robot merged 1 commit intokubernetes:masterfrom
wongma7:pvc-prometheus

Conversation

@wongma7
Copy link
Copy Markdown
Contributor

@wongma7 wongma7 commented Aug 29, 2017

This depends on #51448, opening early though. second commit is mine and mostly a copy/paste job.

implements metrics listed in here kubernetes/community#855 following method here kubernetes/community#930 (comment)

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): kubernetes/enhancements#363

Special notes for your reviewer:

Release note:

PersistentVolumeClaim metrics like "volume_stats_inodes" and "volume_stats_capacity_bytes" are now reported via kubelet prometheus

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Aug 29, 2017
@wongma7
Copy link
Copy Markdown
Contributor Author

wongma7 commented Aug 29, 2017

/sig storage

@k8s-ci-robot k8s-ci-robot added the sig/storage Categorizes an issue or PR as relevant to SIG Storage. label Aug 29, 2017
@jingxu97 jingxu97 self-requested a review August 29, 2017 23:04
@jingxu97
Copy link
Copy Markdown
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 29, 2017
@k8s-github-robot k8s-github-robot added the do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. label Aug 29, 2017
@wongma7 wongma7 changed the title WIP: Expose PVC metrics via kubelet prometheus Expose PVC metrics via kubelet prometheus Aug 29, 2017
@k8s-github-robot k8s-github-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-label-needed labels Aug 29, 2017
@derekwaynecarr
Copy link
Copy Markdown
Member

/retest

@eparis eparis removed the do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. label Aug 30, 2017
@eparis
Copy link
Copy Markdown
Contributor

eparis commented Aug 30, 2017

Appears that do-not-merge was added because the release note section was not originally filled out. It appears to be filled out now, so removing the label.

@derekwaynecarr
Copy link
Copy Markdown
Member

kubelet changes /lgtm

/approve

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 30, 2017
@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 30, 2017
@wongma7
Copy link
Copy Markdown
Contributor Author

wongma7 commented Aug 30, 2017

@jingxu97 I will ping you later to re-add lgtm, we've decided to wait for #51448 to merge first, thanks :]

@wongma7
Copy link
Copy Markdown
Contributor Author

wongma7 commented Aug 31, 2017

/retest

@wongma7
Copy link
Copy Markdown
Contributor Author

wongma7 commented Aug 31, 2017

@jingxu97 please re-add /lgtm, the queue is extremely slow (Estimated Merging 0 PRs per day.) so I'm now more scared of getting left behind than I am of* git, thank you!

@jingxu97
Copy link
Copy Markdown
Contributor

jingxu97 commented Sep 1, 2017

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 1, 2017
@jingxu97
Copy link
Copy Markdown
Contributor

jingxu97 commented Sep 1, 2017

@wongma7 Could you rebase? After that, you could put lgtm too.

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 1, 2017
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 1, 2017
@k8s-github-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: derekwaynecarr, gnufied, jingxu97, wongma7

Associated issue: 363

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@wongma7
Copy link
Copy Markdown
Contributor Author

wongma7 commented Sep 1, 2017

/retest
#49761

@wongma7
Copy link
Copy Markdown
Contributor Author

wongma7 commented Sep 1, 2017

/retest

@abgworrall abgworrall modified the milestone: v1.8 Sep 2, 2017
@gnufied
Copy link
Copy Markdown
Member

gnufied commented Sep 2, 2017

Failure here is related to #51856 and #49613 by the looks of it. Other PRs are failing for same reason.

@gnufied
Copy link
Copy Markdown
Member

gnufied commented Sep 2, 2017

/test pull-kubernetes-kubemark-e2e-gce
/test pull-kubernetes-e2e-kops-aws

@fejta-bot
Copy link
Copy Markdown

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to @fejta).

Review the full test history for this PR.

@k8s-github-robot
Copy link
Copy Markdown

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link
Copy Markdown

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 5781958 into kubernetes:master Sep 3, 2017
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@wongma7: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-e2e-kops-aws dac2068 link /test pull-kubernetes-e2e-kops-aws

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

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. I understand the commands that are listed here.

@tanner-bruce
Copy link
Copy Markdown

Is it possible to get this cherry picked back to 1.6 / 1.7?

@jingxu97
Copy link
Copy Markdown
Contributor

jingxu97 commented Sep 6, 2017

@tanner-bruce because this is 1.8 feature so unfortunately we could not cherry pick this PR.

@piosz
Copy link
Copy Markdown
Member

piosz commented Sep 7, 2017

Prometheus endpoint in kubelet should only export metrics about kubelet state and not about the pods running on the node. Same applies to other components, for example apiserver exports metrics about number of handled requests, but doesn't export any metrics about pods running in Kubernetes cluster.

Resource usage metrics should be exported by:

  1. Kubelet Summary API if they are critical for Kubernetes components to operate (e.g. for scheduler to place pods in optimal way)
    or
  2. 3rd party node-level agent
    See more details in Monitoring Architecture.

Due to historical reasons, as a side effect of linking cadvisor into Kubelet, there are some resource usage metrics exposed through Prometheus endpoint in Kubelet, but we plan to remove it at some point (of course in a graceful way). In particularly this means that this PR uses a deprecated approach.

cc @fgrzadkowski @kubernetes/sig-instrumentation-pr-reviews

@k8s-ci-robot k8s-ci-robot added the sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. label Sep 7, 2017
@brancz
Copy link
Copy Markdown
Member

brancz commented Sep 13, 2017

I agree with @piosz in regards to the inconsistencies with the monitoring architecture, however, due to the nature of how deeply the kubelet is involved in setting up the volumes I can't currently see a better way. Maybe this would be yet another case of the exporter we have been discussing on sig-instrumentation lately? I'm concerned though that the responsibility of this exporter might explode before we even started implementing it.

@eedugon
Copy link
Copy Markdown

eedugon commented Sep 13, 2017

@piosz , @brancz ,

I agree with the view explained by @piosz , but then a quick question in case cadvisor is removed from the picture.

  • who should be responsible of translating information of kubelet summary API into prometheus metrics then?

Because PVs and PVCs are critical components for pods to operate (if the PV is full the pod/container using that pod will have problems for sure). Currently the info is available in summary API, but not in a prometheus metric format.

Thanks and regards!

@brancz
Copy link
Copy Markdown
Member

brancz commented Sep 13, 2017

The idea is that the kubelet is able to retrieve that very information that the scheduler requires for its purposes itself, which could be through a library, that both the kubelet and the cAdvisor replacement would use. If you're interested in the topic I'd suggest to join the bi-weekly sig-instrumentation call 🙂 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/storage Categorizes an issue or PR as relevant to SIG Storage. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.