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

[kube-prometheus-stack] add aws-node exporter #4474

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

micborens
Copy link

@micborens micborens commented Apr 19, 2024

What this PR does / why we need it

Hello, as part of our project to migrate from old prometheus stack deployed independently, we moved to prometheus operator.
Previously we had a job in our config to get metrics from pod aws-node deployed on our EKS cluster.
Instead of declare an additionalScrape config I would like to continue on the new logic (serviceMonitor) to get metrics

  • create a dedicated service for aws-node
  • create a dedicated serviceMonitor to scrape aws-node metrics using the service

Which issue this PR fixes

(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

As part of our project to migrate from old prometheus stack deployed independently, we moved to prometheus operator.
Previously we had a job in our config to get metrics from pod aws-node deployed on our EKS cluster.
Instead of declaring an additionalScrape config I would like to continue on the new logic (serviceMonitor) to get metrics from pods.

Special notes for your reviewer

I've generated manifest and deployed them on my cluster

❯ k get servicemonitor
NAME                                           AGE
prometheus-operator-kube-p-alertmanager        96d
prometheus-operator-kube-p-coredns             96d
prometheus-operator-kube-p-kubelet             96d
prometheus-operator-kube-p-operator            96d
prometheus-operator-kube-p-prometheus          96d
prometheus-operator-kube-promethe-aws-node     16m
prometheus-operator-kube-state-metrics         96d
prometheus-operator-prometheus-node-exporter   96d
❯ k get service -n kube-system
NAME                                         TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                        AGE
kube-dns                                     ClusterIP   172.20.0.10     <none>        53/UDP,53/TCP                  165d
metrics-server                               ClusterIP   172.20.102.30   <none>        443/TCP                        491d
node-local-dns                               ClusterIP   None            <none>        9253/TCP                       324d
node-local-dns-upstream                      ClusterIP   172.20.24.237   <none>        53/UDP,53/TCP                  395d
prometheus-operator-kube-p-coredns           ClusterIP   None            <none>        9153/TCP                       96d
prometheus-operator-kube-p-kubelet           ClusterIP   None            <none>        10250/TCP,10255/TCP,4194/TCP   107d
prometheus-operator-kube-promethe-aws-node   ClusterIP   None            <none>        61678/TCP                      6h15m

image

image

Then I'm able to query all metrics

image

Checklist

  • DCO signed
  • Chart Version bumped
  • Title of the PR starts with chart name (e.g. [prometheus-couchdb-exporter])

Copy link
Member

@jkroepke jkroepke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not like to pull vendor specific services into kube-prometheus-stack.

@QuentinBisson
Copy link
Member

I would advise you to add thé service monitor in the aws exporter upstream chart where it makes more sense :)

@micborens
Copy link
Author

Hello @QuentinBisson & @jkroepke, thx for checking this PR.
I can understand your comment, i didn't find a dedicated chart for aws.
If you have a link to share with me ? Or it doesn't exist yet, and you suggested to create a chart like prometheus-aws-cni-exporter here (https://github.com/prometheus-community/helm-charts/tree/main/charts).
It can contains service/serviceMonitor/prometheusRule manifest.
I prefer to be align with before going on the wrong direction.
My goal here is to provide to the community a solution for the same use case as I'm encountering.

@micborens micborens force-pushed the feat/kube-prometheus-stack.aws-node branch from f7e4327 to 2030708 Compare April 23, 2024 13:45
Signed-off-by: Michael Borens <michael.borens@contentsquare.com>
Signed-off-by: Michael Borens <michael.borens@contentsquare.com>
Signed-off-by: Michael Borens <michael.borens@contentsquare.com>
@micborens micborens force-pushed the feat/kube-prometheus-stack.aws-node branch from 2030708 to dd366ba Compare April 23, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants