Defined Type: nagios::contact
- Defined in:
- manifests/contact.pp
Overview
Define nagios::contact
Use this to define nagios contact objects It creates a contact_$name.cfg in settings dir Define parameters are the same Nagios contact parameters
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'manifests/contact.pp', line 7
define nagios::contact (
$alias = $name,
$service_notification_period = '24x7',
$host_notification_period = '24x7',
$service_notification_options = 'w,u,c,r',
$host_notification_options = 'd,r',
$service_notification_commands = 'notify-service-by-email',
$host_notification_commands = 'notify-host-by-email',
$email = 'root@localhost',
$pager = '',
$options_hash = {},
$ensure = 'present' ) {
include nagios
file { "${nagios::customconfigdir}/settings/contact_${name}.cfg":
ensure => $ensure,
mode => $nagios::config_file_mode,
owner => $nagios::config_file_owner,
group => $nagios::config_file_group,
notify => Service['nagios'],
content => template( 'nagios/contact.erb' ),
}
}
|