I have a use case where we need monitor the threads inside our pods, by using "kubectl top" i am able to monitor CPU, MEMORY.I am new to kubernetes and need to monitor the threads inside our pods.
NAME CPU(cores) CPU% MEMORY(bytes) MEMORY%
ip-XXX.ec2.internal 222m 11% 3237Mi 41%
ip-YYY.ec2.internal 91m 9% 2217Mi 60%
You need to instrument your code using some standard library depending on the language the application is written and then you can expose the metrics at /metrics
endpoint which can be scraped by prometheus and shown in a Grafana dashboard.
If it's a JVM based app then micrometer is easy to use and exposes some metrics by default.
All other major languages has prometheus client library which can used to instrument code and expose metrics.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments