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.

194 lines
5.0KB

  1. icinga2:
  2. master_host: salt
  3. port: 5665
  4. config:
  5. templates:
  6. generic-host:
  7. type: Host
  8. conf:
  9. max_check_attempts: 3
  10. check_interval: 1m
  11. retry_interval: 30s
  12. check_command: hostalive
  13. generic-service:
  14. type: Service
  15. conf:
  16. max_check_attempts: 5
  17. check_interval: 1m
  18. retry_interval: 30s
  19. generic-user:
  20. type: User
  21. generic-template-all:
  22. type: Notification
  23. conf:
  24. types:
  25. - Problem
  26. - Acknowledgement
  27. - Recovery
  28. - Custom
  29. - FlappingStart
  30. - FlappingEnd
  31. - DowntimeStart
  32. - DowntimeEnd
  33. - DowntimeRemoved
  34. period: "24x7"
  35. mail-host-notification:
  36. type: Notification
  37. conf:
  38. import: generic-template-all
  39. command: mail-host-notification
  40. states:
  41. - Up
  42. - Down
  43. mail-service-notification:
  44. type: Notification
  45. conf:
  46. import: generic-template-all
  47. command: mail-service-notification
  48. states:
  49. - OK
  50. - Warning
  51. - Critical
  52. - Unknown
  53. hosts:
  54. NodeName:
  55. type: Host
  56. conf:
  57. import: generic-host
  58. address: 127.0.0.1
  59. vars:
  60. os: Linux
  61. disk_wfree: 15%
  62. ssh_port: 22
  63. disks:
  64. disk:
  65. groups:
  66. linux-servers:
  67. type: HostGroup
  68. conf:
  69. display_name: "Linux Servers"
  70. assign:
  71. - host.vars.os == "Linux"
  72. windows-servers:
  73. type: HostGroup
  74. conf:
  75. display_name: "Windows Servers"
  76. assign:
  77. - host.vars.os == "Windows"
  78. ping:
  79. type: ServiceGroup
  80. conf:
  81. display_name: "Ping Service"
  82. assign:
  83. - match("ping*", service.name)
  84. http:
  85. type: ServiceGroup
  86. conf:
  87. display_name: "HTTP Service"
  88. assign:
  89. - match("http*", service.check_command)
  90. disk:
  91. type: ServiceGroup
  92. conf:
  93. display_name: "Disk Checks"
  94. assign:
  95. - match("disk*", service.check_command)
  96. downtimes:
  97. backup-downtime:
  98. type: ScheduledDowntime
  99. to: Service
  100. conf:
  101. author: icingaadmin
  102. comment: Scheduled downtime for backup
  103. ranges:
  104. monday: service.vars.backup_downtime
  105. tuesday: service.vars.backup_downtime
  106. wednesday: service.vars.backup_downtime
  107. thursday: service.vars.backup_downtime
  108. friday: service.vars.backup_downtime
  109. saturday: service.vars.backup_downtime
  110. sunday: service.vars.backup_downtime
  111. assign:
  112. - service.vars.backup_downtime != ""
  113. notifications:
  114. mail-icingaadmin-host:
  115. type: Notification
  116. to: Host
  117. conf:
  118. import: mail-host-notification
  119. user_groups: host.vars.notification.mail.groups
  120. users: host.vars.notification.mail.users
  121. assign:
  122. - host.vars.notification.mail
  123. mail-icingaadmin-service:
  124. type: Notification
  125. to: Service
  126. conf:
  127. import: mail-service-notification
  128. user_groups: host.vars.notification.mail.groups
  129. users: host.vars.notification.mail.users
  130. assign:
  131. - host.vars.notification.mail
  132. services:
  133. icinga:
  134. type: Service
  135. conf:
  136. import: generic-service
  137. check_command: icinga
  138. assign:
  139. - host.name == NodeName
  140. procs:
  141. type: Service
  142. conf:
  143. import: generic-service
  144. check_command: procs
  145. assign:
  146. - host.name == NodeName
  147. swap:
  148. type: Service
  149. conf:
  150. import: generic-service
  151. check_command: swap
  152. assign:
  153. - host.name == NodeName
  154. users:
  155. type: Service
  156. conf:
  157. import: generic-service
  158. check_command: users
  159. assign:
  160. - host.name == NodeName
  161. ping4:
  162. type: Service
  163. conf:
  164. import: generic-service
  165. check_command: ping4
  166. assign:
  167. - host.address
  168. ssh:
  169. type: Service
  170. conf:
  171. import: generic-service
  172. check_command: ssh
  173. assign:
  174. - (host.address || host.address6) && host.vars.os == "Linux"
  175. load:
  176. type: Service
  177. conf:
  178. import: generic-service
  179. check_command: load
  180. assign:
  181. - host.name == NodeName
  182. http_vhosts:
  183. type: Service
  184. for: (http_vhost => config in host.vars.http_vhosts)
  185. conf:
  186. import: generic-service
  187. check_command: http
  188. disks:
  189. type: Service
  190. for: (disk => config in host.vars.disks)
  191. conf:
  192. import: generic-service
  193. check_command: disk