pattern => 'nrpe',
}
- ferm::rule { 'dsa-nagios-v4':
- description => 'Allow nrpe from nagios master',
- rule => 'proto tcp mod state state (NEW) dport (5666) @subchain \'nagios\' { saddr ($HOST_NAGIOS_V4) ACCEPT; }',
- notarule => true,
- }
- ferm::rule { 'dsa-nagios-v6':
- description => 'Allow nrpe from nagios master',
- domain => 'ip6',
- rule => 'proto tcp mod state state (NEW) dport (5666) @subchain \'nagios\' { saddr ($HOST_NAGIOS_V6) ACCEPT; }',
- notarule => true,
- }
+ Ferm::Rule::Simple <<| tag == 'nagios-nrpe::server' |>>
file { '/etc/default/nagios-nrpe-server':
source => 'puppet:///modules/nagios/common/default',
port => 'domain',
saddr => $base::public_addresses,
}
+
+ # The nagios server wants to connect to the NRPE server on all the hosts
+ @@ferm::rule::simple { "dsa-nrpe-from-${::fqdn}":
+ tag => 'nagios-nrpe::server',
+ description => 'Allow nagios master access to the nrpe daemon',
+ port => '5666',
+ saddr => $base::public_addresses,
+ }
}
}
Ferm::Rule::Simple <<| tag == 'named::primary::ferm' |>>
+ # mini-nag does nrpe queries to check if hosts are still up
+ @@ferm::rule::simple { "dsa-nrpe-from-dnsprimary-${::fqdn}":
+ tag => 'nagios-nrpe::server',
+ description => 'Allow dns primary running mini-nag access to the nrpe daemon',
+ port => '5666',
+ saddr => $base::public_addresses,
+ }
}