Query to get cpu load , hard disk usage in percentage

i m new to grafana , i trying to set alerts for when cpu load , hard disk reaches 85 % what is the query to get this and what metrics i fix in alerts condition for cpu load and hard disk

Hi,

We need more details.

Which datasource do you use ? How you collect your sensor data?

prometheus is the data source , through node exporter we collect the data

Hi!

You can try smth like that for cpu utilization:

(rate(node_cpu_seconds_total{job=“your job”,mode=“idle”}[5m])) * 100))

And this for memory, if you don’t have mem utilization metric:

rate(node_memory_MemTotal_bytes{job=~“your job”}-node_memory_MemFree_bytes{job=~“your job”}-node_memory_Buffers_bytes{job=~“your job”}-node_memory_Cached_bytes{job=~“your job”})/node_memory_MemTotal_bytes{job=~“your job”}*100)

This topic was automatically closed after 365 days. New replies are no longer allowed.