diff --git a/manifests/nagios/objects/template_rules.pp b/manifests/nagios/objects/template_rules.pp index f802b18..947dc5b 100644 --- a/manifests/nagios/objects/template_rules.pp +++ b/manifests/nagios/objects/template_rules.pp @@ -46,8 +46,9 @@ class cd_nagios::nagios::objects::template_rules ( } # example rule - cd_nagios::objects::templates { $name: - ng_template_object => 'contact', + cd_nagios::objects::templates { 'generic contact': + ng_template_object => 'contact', + ng_template_object_name => 'generic-contact', } } } diff --git a/manifests/nagios/objects/templates.pp b/manifests/nagios/objects/templates.pp index 7c05639..889803a 100644 --- a/manifests/nagios/objects/templates.pp +++ b/manifests/nagios/objects/templates.pp @@ -19,6 +19,36 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # @summary Define manages populates /etc/nagios/conf.d/templates.cfg. +# @param [string] ng_template_object the object type for the templates. +# valid options are `contact`, `host` and `service`. +# @param [string] ng_template_object_name populates the name field, +# i.e. `generic-contact`, `generic-host`, `generic-service`. +# @param [string] ng_svc_notification_period Period in which to send out +# notifications for service events, i.e. `24x7`. +# @param [string] ng_svc_notification_period Period in which to send out +# notifications for host events , i.e. `24x7`. +# @param [string] ng_service_notification_options What service events to send +# out notifications for: +# w = notify on WARNING service states, +# u = notify on UNKNOWN service states, +# c = notify on CRITICAL service states, +# r = notify on service recoveries (OK states), +# f = notify when the service starts and stops flapping. +# n = none (the contact will not receive any type of service notifications). +# @param [string] ng_host_notification_options What host events to send +# out notifications for: +# d = notify on DOWN host states, +# u = notify on UNREACHABLE host states, +# r = notify on host recoveries (UP states), +# f = notify when the host starts and stops flapping, +# s = snotify when host or service scheduled downtime starts and ends. +# n = none (the contact will not receive any type of host notifications). +# @param [string] ng_service_notification_commands Command to use for +# service event notification. Command must be defined in commands.cfg +# @param [string] ng_host_notification_commands Command to use for +# host event notification. Command must be defined in commands.cfg. +# @param [string] ng_object_register Whether to register the object to Nagios. +# Since this is a template definition, we do not want to register those. ################################################################################ define cd_nagios::nagios::objects::templates (