summaryrefslogtreecommitdiff
path: root/puppet/modules/nagios/manifests/nsca
diff options
context:
space:
mode:
authorMicah <micah@leap.se>2016-05-24 10:19:34 -0400
committerMicah <micah@leap.se>2016-05-24 10:19:34 -0400
commit4e4f581e5ad057da6dc38a2e820600227168de57 (patch)
treeda512377b1cc9c942d0e2d2ed71ced38ad78f6cc /puppet/modules/nagios/manifests/nsca
parent85a00655cbfa53ddbae455e26700d3d9888bf9f0 (diff)
parenta8c803387fe3a53cfee912470d98b1a39d8b1940 (diff)
Merge commit 'a8c803387fe3a53cfee912470d98b1a39d8b1940' as 'puppet/modules/nagios'
Diffstat (limited to 'puppet/modules/nagios/manifests/nsca')
-rw-r--r--puppet/modules/nagios/manifests/nsca/client.pp18
-rw-r--r--puppet/modules/nagios/manifests/nsca/server.pp24
2 files changed, 42 insertions, 0 deletions
diff --git a/puppet/modules/nagios/manifests/nsca/client.pp b/puppet/modules/nagios/manifests/nsca/client.pp
new file mode 100644
index 00000000..6aa8c0b1
--- /dev/null
+++ b/puppet/modules/nagios/manifests/nsca/client.pp
@@ -0,0 +1,18 @@
+# manage nsca client
+class nagios::nsca::client {
+
+ package{'nsca':
+ ensure => installed
+ }
+
+ file{'/etc/send_nsca.cfg':
+ source => [ "puppet:///modules/site_nagios/nsca/${::fqdn}/send_nsca.cfg",
+ 'puppet:///modules/site_nagios/nsca/send_nsca.cfg',
+ 'puppet:///modules/nagios/nsca/send_nsca.cfg' ],
+ owner => 'nagios',
+ group => 'nogroup',
+ mode => '0400',
+ require => Package['nsca'];
+ }
+
+}
diff --git a/puppet/modules/nagios/manifests/nsca/server.pp b/puppet/modules/nagios/manifests/nsca/server.pp
new file mode 100644
index 00000000..8163eec1
--- /dev/null
+++ b/puppet/modules/nagios/manifests/nsca/server.pp
@@ -0,0 +1,24 @@
+# an nsca server
+class nagios::nsca::server {
+ package{'nsca':
+ ensure => installed
+ }
+
+ service { 'nsca':
+ ensure => running,
+ hasstatus => false,
+ hasrestart => true,
+ require => Package['nsca'],
+ }
+
+ file { '/etc/nsca.cfg':
+ source => [ "puppet:///modules/site_nagios/nsca/${::fqdn}/nsca.cfg",
+ 'puppet:///modules/site_nagios/nsca/nsca.cfg',
+ 'puppet:///modules/nagios/nsca/nsca.cfg' ],
+ owner => 'nagios',
+ group => 'nogroup',
+ mode => '0400',
+ notify => Service['nsca'],
+ }
+
+}