Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

182 lines
4.7KB

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