source => 'puppet:///files/empty/',
notify => Service['nagios-nrpe-server'],
}
- file { '/etc/nagios/nrpe.d/debianorg.cfg':
+
+ concat { '/etc/nagios/nrpe.d/debianorg.cfg':
+ ensure_newline => true,
+ warn => '# This file is maintained with puppet',
+ notify => Service['nagios-nrpe-server'],
+ mode => '0444',
+ }
+ concat { 'nrpe-debian-staticchecks':
+ target => '/etc/nagios/nrpe.d/debianorg.cfg',
content => template('nagios/inc-debian.org.erb'),
- notify => Service['nagios-nrpe-server'],
}
+ Concat::Fragment <<| tag == 'nagios-nrpe::server::debianorg.cfg' |>>
+
file { '/etc/nagios/nrpe.d/nrpe_dsa.cfg':
source => 'puppet:///modules/nagios/dsa-nagios/generated/nrpe_dsa.cfg',
notify => Service['nagios-nrpe-server'],
port => '5666',
saddr => $base::public_addresses,
}
+ @@concat { "nrpe-debian-allow-${::fqdn}":
+ tag => 'nagios-nrpe::server::debianorg.cfg',
+ target => '/etc/nagios/nrpe.d/debianorg.cfg',
+ content => "allowed_hosts=${ $base::public_addresses.join(', ') }",
+ }
}
-##
-## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
-## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
-##
-
-<%=
-nagii = []
-roles = scope.lookupvar('deprecated::roles')
-roles['nagiosmaster'].each do |nag|
- nagii << scope.lookupvar('deprecated::allnodeinfo')[nag]['ipHostNumber']
-end
-roles['extranrpeclient'].each do |nag|
- nagii << scope.lookupvar('deprecated::allnodeinfo')[nag]['ipHostNumber']
-end
-
-out = "allowed_hosts=" + nagii.flatten.sort.uniq.join(',')
-out
-%>
-
-
# the string "system-in-shutdown" is used by the remote side to tell
# if a system is running shutdown. We do not use check_nrpe's
# exit code as that does not reliably tell us if the check could