JoaquinHF

templates.cfg

Aug 28th, 2019
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.08 KB | None | 0 0
  1. ###############################################################################
  2. # TEMPLATES.CFG - SAMPLE OBJECT TEMPLATES
  3. #
  4. #
  5. # NOTES: This config file provides you with some example object definition
  6. # templates that are referred by other host, service, contact, etc.
  7. # definitions in other config files.
  8. #
  9. # You don't need to keep these definitions in a separate file from your
  10. # other object definitions. This has been done just to make things
  11. # easier to understand.
  12. #
  13. ###############################################################################
  14.  
  15.  
  16.  
  17. ###############################################################################
  18. #
  19. # CONTACT TEMPLATES
  20. #
  21. ###############################################################################
  22.  
  23. # Generic contact definition template
  24. # This is NOT a real contact, just a template!
  25.  
  26. define contact {
  27.  
  28. name generic-contact ; The name of this contact template
  29. service_notification_period 24x7 ; service notifications can be sent anytime
  30. host_notification_period 24x7 ; host notifications can be sent anytime
  31. service_notification_options w,u,c,r,s ; send notifications for all service states, flapping events, and scheduled downtime events
  32. host_notification_options d,u,r,s ; send notifications for all host states, flapping events, and scheduled downtime events
  33. service_notification_commands notify-service-by-email, notify-service-by-telegram, ; send service notifications via email
  34. host_notification_commands notify-host-by-email, notify-host-by-telegram, ; send host notifications via email
  35. register 0 ; DON'T REGISTER THIS DEFINITION - ITS NOT A REAL CONTACT, JUST A TEMPLATE!
  36. }
  37. define contact {
  38.  
  39. name contact-metro ; The name of this contact template
  40. service_notification_period 24x7 ; service notifications can be sent anytime
  41. host_notification_period 24x7 ; host notifications can be sent anytime
  42. service_notification_options w,u,c,r,s ; send notifications for all service states, flapping events, and scheduled downti$
  43. host_notification_options d,u,r,s ; send notifications for all host states, flapping events, and scheduled downtime $
  44. service_notification_commands notify-service-by-email, notify-metro-service-by-telegram ; send service notifications via email
  45. host_notification_commands notify-host-by-email, notify-metro-host-by-telegram ; send host notifications via email
  46. register 0 ; DON'T REGISTER THIS DEFINITION - ITS NOT A REAL CONTACT, JUST A TEMPLATE!
  47. }
  48.  
  49.  
  50.  
  51. ###############################################################################
  52. #
  53. # HOST TEMPLATES
  54. #
  55. ###############################################################################
  56.  
  57. # Generic host definition template
  58. # This is NOT a real host, just a template!
  59.  
  60. define host {
  61. name generic-host ; The name of this host template
  62. notifications_enabled 1 ; Host notifications are enabled
  63. event_handler_enabled 1 ; Host event handler is enabled
  64. flap_detection_enabled 1 ; Flap detection is enabled
  65. process_perf_data 1 ; Process performance data
  66. retain_status_information 1 ; Retain status information across program restarts
  67. retain_nonstatus_information 1 ; Retain non-status information across program restarts
  68. notification_period 24x7 ; Send host notifications at any time
  69. register 0 ; DON'T REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
  70. notification_interval 5
  71. }
  72.  
  73.  
  74.  
  75. # Linux host definition template
  76. # This is NOT a real host, just a template!
  77.  
  78. define host {
  79.  
  80. name linux-server ; The name of this host template
  81. use generic-host ; This template inherits other values from the generic-host template
  82. check_period 24x7 ; By default, Linux hosts are checked round the clock
  83. check_interval 5 ; Actively check the host every 5 minutes
  84. retry_interval 1 ; Schedule host check retries at 1 minute intervals
  85. max_check_attempts 10 ; Check each Linux host 10 times (max)
  86. check_command check-host-alive ; Default command to check Linux hosts
  87. notification_period workhours ; Linux admins hate to be woken up, so we only notify during the day
  88. ; Note that the notification_period variable is being overridden from
  89. ; the value that is inherited from the generic-host template!
  90. notification_interval 120 ; Resend notifications every 2 hours
  91. notification_options d,u,r ; Only send notifications for specific host states
  92. contact_groups admins ; Notifications get sent to the admins by default
  93. register 0 ; DON'T REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
  94. }
  95.  
  96.  
  97.  
  98.  
  99. # Windows host definition template
  100. # This is NOT a real host, just a template!
  101.  
  102. define host {
  103.  
  104. name windows-server ; The name of this host template
  105. use generic-host ; Inherit default values from the generic-host template
  106. check_period 24x7 ; By default, Windows servers are monitored round the clock
  107. check_interval 5 ; Actively check the server every 5 minutes
  108. retry_interval 1 ; Schedule host check retries at 1 minute intervals
  109. max_check_attempts 10 ; Check each server 10 times (max)
  110. check_command check-host-alive ; Default command to check if servers are "alive"
  111. notification_period 24x7 ; Send notification out at any time - day or night
  112. notification_interval 30 ; Resend notifications every 30 minutes
  113. notification_options d,r ; Only send notifications for specific host states
  114. contact_groups admins ; Notifications get sent to the admins by default
  115. hostgroups windows-servers ; Host groups that Windows servers should be a member of
  116. register 0 ; DON'T REGISTER THIS - ITS JUST A TEMPLATE
  117. }
  118.  
  119.  
  120.  
  121. # We define a generic printer template that can
  122. # be used for most printers we monitor
  123.  
  124. define host {
  125.  
  126. name generic-printer ; The name of this host template
  127. use generic-host ; Inherit default values from the generic-host template
  128. check_period 24x7 ; By default, printers are monitored round the clock
  129. check_interval 5 ; Actively check the printer every 5 minutes
  130. retry_interval 1 ; Schedule host check retries at 1 minute intervals
  131. max_check_attempts 10 ; Check each printer 10 times (max)
  132. check_command check-host-alive ; Default command to check if printers are "alive"
  133. notification_period workhours ; Printers are only used during the workday
  134. notification_interval 30 ; Resend notifications every 30 minutes
  135. notification_options d,r ; Only send notifications for specific host states
  136. contact_groups admins ; Notifications get sent to the admins by default
  137. register 0 ; DON'T REGISTER THIS - ITS JUST A TEMPLATE
  138. }
  139.  
  140.  
  141.  
  142. # Define a template for switches that we can reuse
  143. define host {
  144.  
  145. name generic-switch ; The name of this host template
  146. use generic-host ; Inherit default values from the generic-host template
  147. check_period 24x7 ; By default, switches are monitored round the clock
  148. check_interval 5 ; Switches are checked every 5 minutes
  149. retry_interval 1 ; Schedule host check retries at 1 minute intervals
  150. max_check_attempts 10 ; Check each switch 10 times (max)
  151. check_command check-host-alive ; Default command to check if routers are "alive"
  152. notification_period 24x7 ; Send notifications at any time
  153. notification_interval 30 ; Resend notifications every 30 minutes
  154. notification_options d,r ; Only send notifications for specific host states
  155. contact_groups admins ; Notifications get sent to the admins by default
  156. register 0 ; DON'T REGISTER THIS - ITS JUST A TEMPLATE
  157. }
  158.  
  159.  
  160.  
  161. ###############################################################################
  162. #
  163. # SERVICE TEMPLATES
  164. #
  165. ###############################################################################
  166.  
  167. # Generic service definition template
  168. # This is NOT a real service, just a template!
  169.  
  170. define service {
  171.  
  172. name generic-service ; The 'name' of this service template
  173. active_checks_enabled 1 ; Active service checks are enabled
  174. passive_checks_enabled 1 ; Passive service checks are enabled/accepted
  175. parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
  176. obsess_over_service 1 ; We should obsess over this service (if necessary)
  177. check_freshness 0 ; Default is to NOT check service 'freshness'
  178. notifications_enabled 1 ; Service notifications are enabled
  179. event_handler_enabled 1 ; Service event handler is enabled
  180. flap_detection_enabled 1 ; Flap detection is enabled
  181. process_perf_data 1 ; Process performance data
  182. retain_status_information 1 ; Retain status information across program restarts
  183. retain_nonstatus_information 1 ; Retain non-status information across program restarts
  184. is_volatile 0 ; The service is not volatile
  185. check_period 24x7 ; The service can be checked at any time of the day
  186. max_check_attempts 3 ; Re-check the service up to 3 times in order to determine its final (hard) state
  187. check_interval 10 ; Check the service every 10 minutes under normal conditions
  188. retry_interval 2 ; Re-check the service every two minutes until a hard state can be determined
  189. contact_groups admins ; Notifications get sent out to everyone in the 'admins' group
  190. notification_options w,u,c,r ; Send notifications about warning, unknown, critical, and recovery events
  191. notification_interval 60 ; Re-notify about service problems every hour
  192. notification_period 24x7 ; Notifications can be sent out at any time
  193. register 0 ; DON'T REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
  194. }
  195.  
  196.  
  197.  
  198. # Local service definition template
  199. # This is NOT a real service, just a template!
  200.  
  201. define service {
  202.  
  203. name local-service ; The name of this service template
  204. use generic-service ; Inherit default values from the generic-service definition
  205. max_check_attempts 4 ; Re-check the service up to 4 times in order to determine its final (hard) state
  206. check_interval 5 ; Check the service every 5 minutes under normal conditions
  207. retry_interval 1 ; Re-check the service every minute until a hard state can be determined
  208. register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
  209. }
Add Comment
Please, Sign In to add comment