Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- define nagios::check (
- $command,
- $ensure = 'present',
- $description = $title,
- $service_template = 'critical-service',
- ) {
- include ::nagios::client
- nrpe::command { "check_${title}":
- ensure => $ensure,
- command => $command,
- }
- @@nagios_service { "check_${title}_${::fqdn}":
- ensure => $ensure,
- check_command => "check_nrpe_1arg!check_${title}",
- use => $service_template,
- host_name => $::fqdn,
- notification_period => '24x7',
- service_description => $description,
- target => "/etc/nagios3/conf.d/${::fqdn}.check_${title}.cfg",
- before => File['/etc/nagios3/conf.d'],
- tag => "nagios_client-${::nagios::client::server}",
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement