helm-charts icon indicating copy to clipboard operation
helm-charts copied to clipboard

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

Open micborens opened this issue 1 year ago • 3 comments

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

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

micborens avatar Apr 19 '24 15:04 micborens

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

QuentinBisson avatar Apr 19 '24 18:04 QuentinBisson

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 avatar Apr 22 '24 06:04 micborens

Yes I would suggest you try to add the chart next to the aws cni one yes unless aws has a public chart repo where this would fit

QuentinBisson avatar May 15 '24 09:05 QuentinBisson