Eolisation de Prometheus
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

alert-rules.yml 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #
  2. # Alert Rules
  3. #
  4. groups:
  5. - name: EoleRules
  6. rules:
  7. # Instance is Down
  8. - alert: JobInstanceDown
  9. expr: up == 0
  10. for: 1m
  11. annotations:
  12. DESCRIPTION: Job {{ $labels.job }} instance {{ $labels.instance }} is down.
  13. SUMMARY: Job instance is down
  14. # Heavy CPU usage
  15. - alert: cpu_threshold_exceeded
  16. expr: (100 * (1 - avg by(instance) (irate(node_cpu{job="%%{job_name_node}",mode="idle"}[5m]))))
  17. > 80
  18. annotations:
  19. description: This device's cpu usage has exceeded the threshold with a value
  20. of {{ $value }}.
  21. summary: Instance {{ $labels.instance }} CPU usage is dangerously high
  22. # Heavy Memory usage
  23. - alert: mem_threshold_exceeded
  24. expr: (node_memory_MemFree{job="%%{job_name_node}"} + node_memory_Cached{job="%%{job_name_node}"} + node_memory_Buffers{job="%%{job_name_node}"})
  25. / 1e+06 < 80
  26. annotations:
  27. description: This device's memory usage has exceeded the threshold with a value
  28. of {{ $value }}.
  29. summary: Instance {{ $labels.instance }} memory usage is dangerously high
  30. # Heavy "/" use
  31. - alert: filesystem_threshold_exceeded
  32. expr: node_filesystem_avail{job="%%{job_name_node}",mountpoint="/"} / node_filesystem_size{job="%%{job_name_node}"}
  33. * 100 < 20
  34. annotations:
  35. description: This device's filesystem usage has exceeded the threshold with
  36. a value of {{ $value }}.
  37. summary: Instance {{ $labels.instance }} filesystem usage is dangerously high
  38. # Heavy CPU temperature
  39. - alert: cpu_temp_threshold_exceeded
  40. expr: avg(node_hwmon_temp_celsius{job="node"}) BY (instance)
  41. > 50
  42. annotations:
  43. description: This device's cpu temperature has exceeded the threshold with a value
  44. of {{ $value }}.
  45. summary: Instance {{ $labels.instance }} CPU temperature is dangerously high