systemdunits.conf 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. ## Check if the are any systemd units in the failed state (crashed).
  2. ## States: 1 - active, 2 - inactive, 3 - activating, 4 - deactivating, 5 - failed.
  3. ## Service units
  4. template: systemd_service_units_state
  5. on: systemd.service_units_state
  6. class: Errors
  7. type: Linux
  8. component: Systemd units
  9. lookup: max -1s min2max
  10. units: ok/failed
  11. every: 10s
  12. warn: $this != nan AND $this == 5
  13. delay: down 5m multiplier 1.5 max 1h
  14. info: one or more systemd service units are in the failed state
  15. to: sysadmin
  16. ## Socket units
  17. template: systemd_socket_units_state
  18. on: systemd.socket_unit_state
  19. class: Errors
  20. type: Linux
  21. component: Systemd units
  22. lookup: max -1s min2max
  23. units: ok/failed
  24. every: 10s
  25. warn: $this != nan AND $this == 5
  26. delay: down 5m multiplier 1.5 max 1h
  27. info: one or more systemd socket units are in the failed state
  28. to: sysadmin
  29. ## Target units
  30. template: systemd_target_units_state
  31. on: systemd.target_unit_state
  32. class: Errors
  33. type: Linux
  34. component: Systemd units
  35. lookup: max -1s min2max
  36. units: ok/failed
  37. every: 10s
  38. warn: $this != nan AND $this == 5
  39. delay: down 5m multiplier 1.5 max 1h
  40. info: one or more systemd target units are in the failed state
  41. to: sysadmin
  42. ## Path units
  43. template: systemd_path_units_state
  44. on: systemd.path_unit_state
  45. class: Errors
  46. type: Linux
  47. component: Systemd units
  48. lookup: max -1s min2max
  49. units: ok/failed
  50. every: 10s
  51. warn: $this != nan AND $this == 5
  52. delay: down 5m multiplier 1.5 max 1h
  53. info: one or more systemd path units are in the failed state
  54. to: sysadmin
  55. ## Device units
  56. template: systemd_device_units_state
  57. on: systemd.device_unit_state
  58. class: Errors
  59. type: Linux
  60. component: Systemd units
  61. lookup: max -1s min2max
  62. units: ok/failed
  63. every: 10s
  64. warn: $this != nan AND $this == 5
  65. delay: down 5m multiplier 1.5 max 1h
  66. info: one or more the systemd device units are in the failed state
  67. to: sysadmin
  68. ## Mount units
  69. template: systemd_mount_units_state
  70. on: systemd.mount_unit_state
  71. class: Errors
  72. type: Linux
  73. component: Systemd units
  74. lookup: max -1s min2max
  75. units: ok/failed
  76. every: 10s
  77. warn: $this != nan AND $this == 5
  78. delay: down 5m multiplier 1.5 max 1h
  79. info: one or more the systemd mount units are in the failed state
  80. to: sysadmin
  81. ## Automount units
  82. template: systemd_automount_units_state
  83. on: systemd.automount_unit_state
  84. class: Errors
  85. type: Linux
  86. component: Systemd units
  87. lookup: max -1s min2max
  88. units: ok/failed
  89. every: 10s
  90. warn: $this != nan AND $this == 5
  91. delay: down 5m multiplier 1.5 max 1h
  92. info: one or more systemd automount units are in the failed state
  93. to: sysadmin
  94. ## Swap units
  95. template: systemd_swap_units_state
  96. on: systemd.swap_unit_state
  97. class: Errors
  98. type: Linux
  99. component: Systemd units
  100. lookup: max -1s min2max
  101. units: ok/failed
  102. every: 10s
  103. warn: $this != nan AND $this == 5
  104. delay: down 5m multiplier 1.5 max 1h
  105. info: one or more systemd swap units are in the failed state
  106. to: sysadmin
  107. ## Scope units
  108. template: systemd_scope_units_state
  109. on: systemd.scope_unit_state
  110. class: Errors
  111. type: Linux
  112. component: Systemd units
  113. lookup: max -1s min2max
  114. units: ok/failed
  115. every: 10s
  116. warn: $this != nan AND $this == 5
  117. delay: down 5m multiplier 1.5 max 1h
  118. info: one or more systemd scope units are in the failed state
  119. to: sysadmin
  120. ## Slice units
  121. template: systemd_slice_units_state
  122. on: systemd.slice_unit_state
  123. class: Errors
  124. type: Linux
  125. component: Systemd units
  126. lookup: max -1s min2max
  127. units: ok/failed
  128. every: 10s
  129. warn: $this != nan AND $this == 5
  130. delay: down 5m multiplier 1.5 max 1h
  131. info: one or more systemd slice units are in the failed state
  132. to: sysadmin