object_service.conf.erb 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /**
  2. * WARNING: This service definition is automatically generated by Puppet.
  3. * ANY MANUAL CHANGES TO IT WILL GET OVERWRITTEN!
  4. */
  5. /**
  6. * A service definition. You can create your own configuration files
  7. * in the conf.d directory (e.g. one per host). By default all *.conf
  8. * files in this directory are included.
  9. *
  10. */
  11. object Service "<%= @object_servicename %>" {
  12. <%#- If any of the @ parameters are undefined, don't print anything for them: -%>
  13. <%- if @template_to_import -%>
  14. <%#- Otherwise, include the parameter: -%>
  15. import "<%= @template_to_import -%>"
  16. <%- end -%>
  17. <%- if @display_name -%>
  18. display_name = "<%= @display_name -%>"
  19. <%- end -%>
  20. <%- if @host_name -%>
  21. host_name = "<%= @host_name -%>"
  22. <%- end -%>
  23. <%- if @groups.length != 0 -%>
  24. groups = [ <%- @groups.each do |group| -%> "<%= group %>", <%- end -%>]
  25. <%- end -%>
  26. <%- if @vars.empty? != true -%>
  27. <%- @vars.sort_by {|key, value| key}.each do |key, value| -%>
  28. vars.<%= key %> = "<%= value %>"
  29. <%- end -%>
  30. <%- end -%>
  31. <%- if @check_command -%>
  32. check_command = "<%= @check_command -%>"
  33. <%- end -%>
  34. <%- if @max_check_attempts -%>
  35. max_check_attempts = <%= @max_check_attempts %>
  36. <%- end -%>
  37. <%- if @check_period -%>
  38. check_period = <%= @check_period %>
  39. <%- end -%>
  40. <%- if @check_interval -%>
  41. check_interval = <%= @check_interval %>
  42. <%- end -%>
  43. <%- if @retry_interval -%>
  44. retry_interval = <%= @retry_interval %>
  45. <%- end -%>
  46. <%- if @enable_notifications -%>
  47. enable_notifications = <%= @enable_notifications %>
  48. <%- end -%>
  49. <%- if @enable_active_checks -%>
  50. enable_active_checks = <%= @enable_active_checks %>
  51. <%- end -%>
  52. <%- if @enable_passive_checks -%>
  53. enable_passive_checks = <%= @enable_passive_checks %>
  54. <%- end -%>
  55. <%- if @enable_event_handler -%>
  56. enable_event_handler = <%= @enable_event_handler %>
  57. <%- end -%>
  58. <%- if @enable_flapping -%>
  59. enable_flapping = <%= @enable_flapping %>
  60. <%- end -%>
  61. <%- if @enable_perfdata -%>
  62. enable_perfdata = <%= @enable_perfdata %>
  63. <%- end -%>
  64. <%- if @event_command -%>
  65. event_command = "<%= @event_command -%>"
  66. <%- end -%>
  67. <%- if @flapping_threshold -%>
  68. flapping_threshold = "<%= @flapping_threshold -%>"
  69. <%- end -%>
  70. <%- if @volatile -%>
  71. volatile = "<%= @volatile -%>"
  72. <%- end -%>
  73. <%- if @notes -%>
  74. notes = "<%= @notes -%>"
  75. <%- end -%>
  76. <%- if @notes_url -%>
  77. notes_url = "<%= @notes_url -%>"
  78. <%- end -%>
  79. <%- if @action_url -%>
  80. action_url = "<%= @action_url -%>"
  81. <%- end -%>
  82. <%- if @icon_image -%>
  83. icon_image = "<%= @icon_image -%>"
  84. <%- end -%>
  85. <%- if @icon_image_alt -%>
  86. icon_image_alt = "<%= @icon_image_alt -%>"
  87. <%- end -%>
  88. }