Hi,
I have many instance/tenant like x , y and z . I want to monitor the microservice status which are deployed in an particular instance/tenant in grafana using prometheus.
The queries which i am using currently:
A) For disk Usage= sum(disk_total_bytes{instance=~“$tenant”})
B) For cpu usage= sum(system_cpu_usage{instance=“$tenant”})
c) memory usage = ?
d) cpu usage by single microservice=?
e) Request Count on microservice= (http_server_requests_seconds_count{ instance=“$tenant”, job=“$microservice”}
f) Response time of microservice =?
g) exception count =?
please verify the above queries which I am using and please provide the correct prometheus queries for the above mentioned parameters.
server machine= windows
grafana=9.3.1
prometheus=2.37.4
I’m not sure if understand your query. The queries in grafana depend highly on your deployed microservices and when you have defined a data source in grafana you can explore this yourself and try out your queries directly.
So I guess nobody can verify your queries and provide you correct ones. You need to explore this yourself using prometheus and grafana.
The data source which I am defining in grafana is prometheus.
Suppose,If i want to create dashboard for cpu usage, i am getting few metrics for cpu in prometheus such as,
a) system_cpu_count
b) system_cpu_usage
c )process_cpu_usage
I have tried searching , but not able to find which metric to use for cpu usage and or else do i need to create a formula out of these metrics.
Again the metrics provided to prometheus and grafana highly depends on the microservice. If you using Spring Boot microservices you can google for the metrics to get some explanation.
In your example of
system_cpu_usage → The CPU usage of the host system
process_cpu_usage → The CPU usage of the JVM
system_cpu_count → The number of CPU cores of the host system.
Both might be relevant, depends on your monitoring use case.
As cumulocity by default enables the prometheus endpoint for the services,
Dont we have any documentations on metrics and prometheus queries that we can use for the specific parameter monitoring.
Cumulocity does not enable per default prometheus endpoint for all services but for a few like apama. This again depends on the service and is not documented/supported for all services. Also the metrics might be different per service.
Beside of the default spring actuator and micrometer there is no documentation for that.