Register manualroutes from the service class for the three services that had it hardc...
[mirror/dsa-puppet.git] / modules / roles / manifests / dns_primary.pp
index d846c1b..8dd0f00 100644 (file)
@@ -51,4 +51,16 @@ class roles::dns_primary(
   }
   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,
+  }
+  @@concat::fragment { "nrpe-debian-allow-${::fqdn}":
+    tag     => 'nagios-nrpe::server::debianorg.cfg',
+    target  => '/etc/nagios/nrpe.d/debianorg.cfg',
+    content => "allowed_hosts=${ $base::public_addresses.join(', ') }",
+  }
 }