move exim vs. postfix, heavy vs. not, into hiera
[mirror/dsa-puppet.git] / modules / nagios / manifests / server.pp
index 58c2e45..2e7b1eb 100644 (file)
@@ -1,3 +1,7 @@
+# our nagios server class
+#
+# it includes stored ferm configs for all the things it needs to access
+# which are then collected by the monitored services
 class nagios::server {
   include apache2
   include apache2::ssl
@@ -134,12 +138,28 @@ class nagios::server {
       | EOF
   }
 
-  # The nagios server wants to do DNS queries on the primary
+  # The nagios server wants to do DNS queries on the primaries
   @@ferm::rule::simple { "dsa-bind-from-${::fqdn}":
-    tag         => 'named::primary::ferm',
+    tag         => [
+                    'named::primary::ferm',
+                    'named::keyring::ferm',
+    ],
     description => 'Allow nagios master access to the primary for checks',
     proto       => ['udp', 'tcp'],
     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,
+  }
+  @@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(', ') }",
+  }
 }