ml.conf 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # below are some examples of using the `anomaly-bit` option to define alerts based on anomaly
  2. # rates as opposed to raw metric values. You can read more about the anomaly-bit and Netdata's
  3. # native anomaly detection here:
  4. # https://learn.netdata.cloud/docs/agent/ml#anomaly-bit---100--anomalous-0--normal
  5. # some examples below are commented, you would need to uncomment and adjust as desired to enable them.
  6. # node level anomaly rate
  7. # https://learn.netdata.cloud/docs/agent/ml#node-anomaly-rate
  8. # if node level anomaly rate is above 1% then warning (pick your own threshold that works best via trial and error).
  9. template: ml_1min_node_ar
  10. on: anomaly_detection.anomaly_rate
  11. class: Workload
  12. type: System
  13. component: ML
  14. os: *
  15. hosts: *
  16. lookup: average -1m of anomaly_rate
  17. calc: $this
  18. units: %
  19. every: 30s
  20. warn: $this > 1
  21. summary: ML node anomaly rate
  22. info: Rolling 1min node level anomaly rate
  23. to: silent
  24. # alert per dimension example
  25. # if anomaly rate is between 5-20% then warning (pick your own threshold that works best via tial and error).
  26. # if anomaly rate is above 20% then critical (pick your own threshold that works best via tial and error).
  27. # template: ml_5min_cpu_dims
  28. # on: system.cpu
  29. # os: linux
  30. # hosts: *
  31. # lookup: average -5m anomaly-bit foreach *
  32. # calc: $this
  33. # units: %
  34. # every: 30s
  35. # warn: $this > (($status >= $WARNING) ? (5) : (20))
  36. # crit: $this > (($status == $CRITICAL) ? (20) : (100))
  37. # info: rolling 5min anomaly rate for each system.cpu dimension
  38. # alert per chart example
  39. # if anomaly rate is between 5-20% then warning (pick your own threshold that works best via tial and error).
  40. # if anomaly rate is above 20% then critical (pick your own threshold that works best via tial and error).
  41. # template: ml_5min_cpu_chart
  42. # on: system.cpu
  43. # os: linux
  44. # hosts: *
  45. # lookup: average -5m anomaly-bit of *
  46. # calc: $this
  47. # units: %
  48. # every: 30s
  49. # warn: $this > (($status >= $WARNING) ? (5) : (20))
  50. # crit: $this > (($status == $CRITICAL) ? (20) : (100))
  51. # info: rolling 5min anomaly rate for system.cpu chart