testing templates
This commit is contained in:
@@ -19,8 +19,9 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# @summary Class manages /etc/nagios/conf.d/templates.cfg through concat.
|
||||
# @example cd_nagios::objects::templates { $name:
|
||||
# ng_template_object => 'service',
|
||||
# @example cd_nagios::nagios::objects::templates { 'generic contact':
|
||||
# ng_template_object => 'contact',
|
||||
# ng_template_object_name => 'generic-contact',
|
||||
# }
|
||||
################################################################################
|
||||
class cd_nagios::nagios::objects::template_rules (
|
||||
@@ -45,10 +46,37 @@ class cd_nagios::nagios::objects::template_rules (
|
||||
notify => Service[$ng_service],
|
||||
}
|
||||
|
||||
# example rule
|
||||
cd_nagios::objects::templates { 'generic contact':
|
||||
# basic templates
|
||||
cd_nagios::nagios::objects::templates { 'generic contact':
|
||||
ng_template_object => 'contact',
|
||||
ng_template_object_name => 'generic-contact',
|
||||
}
|
||||
cd_nagios::nagios::objects::templates { 'generic-host':
|
||||
ng_template_object => 'host',
|
||||
ng_template_object_name => 'generic-host',
|
||||
}
|
||||
cd_nagios::nagios::objects::templates { 'linux-server':
|
||||
ng_template_object => 'host',
|
||||
ng_template_object_name => 'linux-server',
|
||||
ng_template_object_use => 'generic-host',
|
||||
ng_notification_options => 'd,u,r',
|
||||
}
|
||||
cd_nagios::nagios::objects::templates { 'windows-server':
|
||||
ng_template_object => 'host',
|
||||
ng_template_object_name => 'windows-server',
|
||||
ng_template_object_use => 'generic-host',
|
||||
ng_notification_options => 'd,u,r',
|
||||
}
|
||||
cd_nagios::nagios::objects::templates { 'generic-service':
|
||||
ng_template_object => 'service',
|
||||
ng_template_object_name => 'generic-service',
|
||||
ng_max_check_attempts => '3',
|
||||
ng_notification_options => 'w,u,c,r',
|
||||
}
|
||||
cd_nagios::nagios::objects::templates { 'local-service':
|
||||
ng_template_object => 'service',
|
||||
ng_template_object_name => 'generic-service',
|
||||
ng_max_check_attempts => '4',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user