Skip to content

Instantly share code, notes, and snippets.

@s-chb
Created July 28, 2020 16:14
Show Gist options
  • Save s-chb/bf6c913623492e3f523b82f2e6e8b5e5 to your computer and use it in GitHub Desktop.
Save s-chb/bf6c913623492e3f523b82f2e6e8b5e5 to your computer and use it in GitHub Desktop.
grafana rules
Grafana Queries:
1. CPU load :
sum(irate(node_cpu_seconds_total{mode="idle",instance=~'$node'}[5m])) or sum(irate(node_cpu{mode="idle",instance=~'$node'}[5m]))
2. Memory Usage :
100-(node_memory_MemAvailable{instance=~'$node'}/node_memory_MemTotal{instance=~'$node'}*100)
3. Disk Space Usage
100-((node_filesystem_avail{instance=~'$node',mountpoint="/"} * 100) / node_filesystem_size{instance=~'$node',mountpoint="/"})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment