ghouscht / metrics-server-exporter Goto Github PK
View Code? Open in Web Editor NEWExport metrics-server metrics to prometheus
License: MIT License
Export metrics-server metrics to prometheus
License: MIT License
Project description:
Metrics Server collects resource metrics from Kubelets and exposes them in Kubernetes apiserver through Metrics API for use by Horizontal Pod Autoscaler and Vertical Pod Autoscaler.
But why not use these metrics to create alerts with alertmanager or to visualize resource usage with grafana?
is based on Metrics Server description but skips the next paragraph:
Metrics Server is not meant for non-autoscaling purposes. For example, don't use it to forward metrics to monitoring solutions, or as a source of monitoring solution metrics.
Kubelets in version 1.18+ have endpoint /metrics/resource
which exposes same resource usage metrics as exposed by Metrics Server, but with improvement of being cumulative metrics instead of average load from last 15s. This means that you can collect them at higher resolution and calculate more accurate usage.
I'm trying to expose to NodePort, so I can scrape outside k8s cluster, I try this service but NodePort url not working
apiVersion: v1
kind: Service
metadata:
name: metrics-server-exporter
labels:
app: metrics-server-exporter
spec:
type: NodePort
ports:
Good morning
I did deploy the node-exporter inside the AKS Cluster with the Cluster IP configuration for my load balancer.
If I test from another pod, the result is ok, example:
curl http://metrics-server-exporter.kube-system.svc.cluster.local:8080/metrics
go_gc_duration_seconds{quantile="0"} 8.279e-06
go_gc_duration_seconds{quantile="0.25"} 1.005e-05
go_gc_duration_seconds{quantile="0.5"} 3.6797e-05
go_gc_duration_seconds{quantile="0.75"} 7.3091e-05
go_gc_duration_seconds{quantile="1"} 0.000105625
But, I I test from my computer with curl command, I receveid 404
(I change URI for metrics-k8s in backend conf for create the isolation)
curl -v http://jd-stg-k8s.aws.acesso.intra/metrics-k8s
GET /metrics-k8s HTTP/1.1
Host: jd-stg-k8s.aws.acesso.intra
User-Agent: curl/7.74.0
Accept: /
=== My yaml
apiVersion: v1
kind: List
items:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.