summaryrefslogtreecommitdiff
path: root/puppet/modules/site_check_mk/manifests
diff options
context:
space:
mode:
authorMicah Anderson <micah@leap.se>2015-06-11 12:10:09 -0400
committerMicah Anderson <micah@leap.se>2015-06-11 12:10:09 -0400
commitb429b30bda4dafc78cb02f6ece5d82f08e35de1f (patch)
tree37efc30a4fcb642dec583c3accea76f7a7de9c39 /puppet/modules/site_check_mk/manifests
parent67b2bea2dfcfb06191bf5ed562309f264c6aed8c (diff)
parentd9146415db0e6b7dd0c945039c0a4ed4fd054a7d (diff)
Merge tag '0.7.0'
Releasing 0.7.0
Diffstat (limited to 'puppet/modules/site_check_mk/manifests')
-rw-r--r--puppet/modules/site_check_mk/manifests/agent/couchdb.pp35
-rw-r--r--puppet/modules/site_check_mk/manifests/agent/haproxy.pp11
-rw-r--r--puppet/modules/site_check_mk/manifests/agent/haveged.pp15
-rw-r--r--puppet/modules/site_check_mk/manifests/agent/mrpe.pp12
-rw-r--r--puppet/modules/site_check_mk/manifests/agent/mx.pp11
-rw-r--r--puppet/modules/site_check_mk/manifests/agent/openvpn.pp2
-rw-r--r--puppet/modules/site_check_mk/manifests/agent/soledad.pp13
-rw-r--r--puppet/modules/site_check_mk/manifests/agent/stunnel.pp2
-rw-r--r--puppet/modules/site_check_mk/manifests/agent/tapicero.pp25
-rw-r--r--puppet/modules/site_check_mk/manifests/agent/webapp.pp8
10 files changed, 92 insertions, 42 deletions
diff --git a/puppet/modules/site_check_mk/manifests/agent/couchdb.pp b/puppet/modules/site_check_mk/manifests/agent/couchdb.pp
index ee0268a3..abfc7ad0 100644
--- a/puppet/modules/site_check_mk/manifests/agent/couchdb.pp
+++ b/puppet/modules/site_check_mk/manifests/agent/couchdb.pp
@@ -12,13 +12,21 @@ class site_check_mk::agent::couchdb {
# check bigcouch processes
- file_line {
+ augeas {
'Bigcouch_epmd_procs':
- line => 'Bigcouch_epmd_procs /usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -a /opt/bigcouch/erts-5.9.1/bin/epmd',
- path => '/etc/check_mk/mrpe.cfg';
+ incl => '/etc/check_mk/mrpe.cfg',
+ lens => 'Spacevars.lns',
+ changes => [
+ 'rm /files/etc/check_mk/mrpe.cfg/Bigcouch_epmd_procs',
+ 'set Bigcouch_epmd_procs \'/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -a /opt/bigcouch/erts-5.9.1/bin/epmd\'' ],
+ require => File['/etc/check_mk/mrpe.cfg'];
'Bigcouch_beam_procs':
- line => 'Bigcouch_beam_procs /usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -a /opt/bigcouch/erts-5.9.1/bin/beam',
- path => '/etc/check_mk/mrpe.cfg';
+ incl => '/etc/check_mk/mrpe.cfg',
+ lens => 'Spacevars.lns',
+ changes => [
+ 'rm /files/etc/check_mk/mrpe.cfg/Bigcouch_beam_procs',
+ 'set Bigcouch_beam_procs \'/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -a /opt/bigcouch/erts-5.9.1/bin/beam\'' ],
+ require => File['/etc/check_mk/mrpe.cfg'];
}
# check open files for bigcouch proc
@@ -27,10 +35,21 @@ class site_check_mk::agent::couchdb {
source => 'puppet:///modules/site_check_mk/agent/nagios_plugins/check_unix_open_fds.pl',
mode => '0755'
}
- file_line {
+ augeas {
'Bigcouch_open_files':
- line => 'Bigcouch_open_files /srv/leap/nagios/plugins/check_unix_open_fds.pl -a beam -w 28672,28672 -c 30720,30720',
- path => '/etc/check_mk/mrpe.cfg';
+ incl => '/etc/check_mk/mrpe.cfg',
+ lens => 'Spacevars.lns',
+ changes => [
+ 'rm /files/etc/check_mk/mrpe.cfg/Bigcouch_open_files',
+ 'set Bigcouch_open_files \'/srv/leap/nagios/plugins/check_unix_open_fds.pl -a beam -w 28672,28672 -c 30720,30720\'' ],
+ require => File['/etc/check_mk/mrpe.cfg'];
}
+
+ # check different couchdb stats
+ file { '/usr/lib/check_mk_agent/local/leap_couch_stats.sh':
+ source => 'puppet:///modules/site_check_mk/agent/local_checks/couchdb/leap_couch_stats.sh',
+ mode => '0755',
+ require => Package['check_mk-agent']
+ }
}
diff --git a/puppet/modules/site_check_mk/manifests/agent/haproxy.pp b/puppet/modules/site_check_mk/manifests/agent/haproxy.pp
index e7986db1..6d52efba 100644
--- a/puppet/modules/site_check_mk/manifests/agent/haproxy.pp
+++ b/puppet/modules/site_check_mk/manifests/agent/haproxy.pp
@@ -3,10 +3,13 @@ class site_check_mk::agent::haproxy {
include site_check_mk::agent::package::nagios_plugins_contrib
# local nagios plugin checks via mrpe
- file_line {
- 'haproxy':
- line => 'Haproxy /usr/lib/nagios/plugins/check_haproxy -u "http://localhost:8000/haproxy;csv"',
- path => '/etc/check_mk/mrpe.cfg';
+ augeas { 'haproxy':
+ incl => '/etc/check_mk/mrpe.cfg',
+ lens => 'Spacevars.lns',
+ changes => [
+ 'rm /files/etc/check_mk/mrpe.cfg/Haproxy',
+ 'set Haproxy \'/usr/lib/nagios/plugins/check_haproxy -u "http://localhost:8000/haproxy;csv"\'' ],
+ require => File['/etc/check_mk/mrpe.cfg'];
}
}
diff --git a/puppet/modules/site_check_mk/manifests/agent/haveged.pp b/puppet/modules/site_check_mk/manifests/agent/haveged.pp
new file mode 100644
index 00000000..cacbea8c
--- /dev/null
+++ b/puppet/modules/site_check_mk/manifests/agent/haveged.pp
@@ -0,0 +1,15 @@
+class site_check_mk::agent::haveged {
+
+# check haveged process
+ augeas {
+ 'haveged_proc':
+ incl => '/etc/check_mk/mrpe.cfg',
+ lens => 'Spacevars.lns',
+ changes => [
+ 'rm /files/etc/check_mk/mrpe.cfg/haveged_proc',
+ 'set haveged_proc \'/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -a /usr/sbin/haveged\'' ],
+ require => File['/etc/check_mk/mrpe.cfg'];
+
+ }
+
+}
diff --git a/puppet/modules/site_check_mk/manifests/agent/mrpe.pp b/puppet/modules/site_check_mk/manifests/agent/mrpe.pp
index 6921574f..5e1f087a 100644
--- a/puppet/modules/site_check_mk/manifests/agent/mrpe.pp
+++ b/puppet/modules/site_check_mk/manifests/agent/mrpe.pp
@@ -11,8 +11,14 @@ class site_check_mk::agent::mrpe {
ensure => present,
require => Package['check-mk-agent']
} ->
- file_line { 'Apt':
- line => 'APT /usr/lib/nagios/plugins/check_apt',
- path => '/etc/check_mk/mrpe.cfg',
+
+ augeas {
+ 'Apt':
+ incl => '/etc/check_mk/mrpe.cfg',
+ lens => 'Spacevars.lns',
+ changes => [
+ 'rm /files/etc/check_mk/mrpe.cfg/APT',
+ 'set APT \'/usr/lib/nagios/plugins/check_apt\'' ];
}
+
}
diff --git a/puppet/modules/site_check_mk/manifests/agent/mx.pp b/puppet/modules/site_check_mk/manifests/agent/mx.pp
index 1e370125..98757b59 100644
--- a/puppet/modules/site_check_mk/manifests/agent/mx.pp
+++ b/puppet/modules/site_check_mk/manifests/agent/mx.pp
@@ -6,13 +6,16 @@ class site_check_mk::agent::mx {
}
# local nagios plugin checks via mrpe
- file_line {
+ augeas {
'Leap_MX_Procs':
- line => 'Leap_MX_Procs /usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -a \'/usr/bin/python /usr/bin/twistd --pidfile=/var/run/leap_mx.pid --rundir=/var/lib/leap_mx/ --python=/usr/share/app/leap_mx.tac --logfile=/var/log/leap_mx.log\'',
- path => '/etc/check_mk/mrpe.cfg';
+ incl => '/etc/check_mk/mrpe.cfg',
+ lens => 'Spacevars.lns',
+ changes => [
+ 'rm /files/etc/check_mk/mrpe.cfg/Leap_MX_Procs',
+ 'set Leap_MX_Procs \'/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -a "/usr/bin/python /usr/bin/twistd --pidfile=/var/run/leap_mx.pid --rundir=/var/lib/leap_mx/ --python=/usr/share/app/leap_mx.tac --logfile=/var/log/leap/mx.log"\'' ],
+ require => File['/etc/check_mk/mrpe.cfg'];
}
-
# check stale files in queue dir
file { '/usr/lib/check_mk_agent/local/check_leap_mx.sh':
source => 'puppet:///modules/site_check_mk/agent/local_checks/mx/check_leap_mx.sh',
diff --git a/puppet/modules/site_check_mk/manifests/agent/openvpn.pp b/puppet/modules/site_check_mk/manifests/agent/openvpn.pp
index 919a408d..0596a497 100644
--- a/puppet/modules/site_check_mk/manifests/agent/openvpn.pp
+++ b/puppet/modules/site_check_mk/manifests/agent/openvpn.pp
@@ -2,7 +2,7 @@ class site_check_mk::agent::openvpn {
# check syslog
concat::fragment { 'syslog_openpvn':
- source => 'puppet:///modules/site_check_mk/agent/logwatch/syslog/openvpn.cfg',
+ source => 'puppet:///modules/site_check_mk/agent/logwatch/openvpn.cfg',
target => '/etc/check_mk/logwatch.d/syslog.cfg',
order => '02';
}
diff --git a/puppet/modules/site_check_mk/manifests/agent/soledad.pp b/puppet/modules/site_check_mk/manifests/agent/soledad.pp
index 512d1a3d..f4a3f3a6 100644
--- a/puppet/modules/site_check_mk/manifests/agent/soledad.pp
+++ b/puppet/modules/site_check_mk/manifests/agent/soledad.pp
@@ -5,10 +5,13 @@ class site_check_mk::agent::soledad {
}
# local nagios plugin checks via mrpe
- file_line {
- 'Soledad_Procs':
- line => 'Soledad_Procs /usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -a \'/usr/bin/python /usr/bin/twistd --pidfile=/var/run/soledad.pid --logfile=/var/log/soledad.log web --wsgi=leap.soledad.server.application\'',
- path => '/etc/check_mk/mrpe.cfg';
- }
+ augeas { 'Soledad_Procs':
+ incl => '/etc/check_mk/mrpe.cfg',
+ lens => 'Spacevars.lns',
+ changes => [
+ 'rm /files/etc/check_mk/mrpe.cfg/Soledad_Procs',
+ 'set Soledad_Procs \'/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -a "/usr/bin/python /usr/bin/twistd --uid=soledad --gid=soledad --pidfile=/var/run/soledad.pid --logfile=/var/log/soledad.log web --wsgi=leap.soledad.server.application --port=ssl:2323:privateKey=/etc/x509/keys/leap.key:certKey=/etc/x509/certs/leap.crt:sslmethod=SSLv23_METHOD"\'' ],
+ require => File['/etc/check_mk/mrpe.cfg'];
+ }
}
diff --git a/puppet/modules/site_check_mk/manifests/agent/stunnel.pp b/puppet/modules/site_check_mk/manifests/agent/stunnel.pp
index 64022824..7f765771 100644
--- a/puppet/modules/site_check_mk/manifests/agent/stunnel.pp
+++ b/puppet/modules/site_check_mk/manifests/agent/stunnel.pp
@@ -1,7 +1,7 @@
class site_check_mk::agent::stunnel {
concat::fragment { 'syslog_stunnel':
- source => 'puppet:///modules/site_check_mk/agent/logwatch/syslog/stunnel.cfg',
+ source => 'puppet:///modules/site_check_mk/agent/logwatch/stunnel.cfg',
target => '/etc/check_mk/logwatch.d/syslog.cfg',
order => '02';
}
diff --git a/puppet/modules/site_check_mk/manifests/agent/tapicero.pp b/puppet/modules/site_check_mk/manifests/agent/tapicero.pp
index ffd11100..4a5ec68e 100644
--- a/puppet/modules/site_check_mk/manifests/agent/tapicero.pp
+++ b/puppet/modules/site_check_mk/manifests/agent/tapicero.pp
@@ -2,21 +2,24 @@ class site_check_mk::agent::tapicero {
include ::site_nagios::plugins
- concat::fragment { 'syslog_tapicero':
- source => 'puppet:///modules/site_check_mk/agent/logwatch/syslog/tapicero.cfg',
- target => '/etc/check_mk/logwatch.d/syslog.cfg',
- order => '02';
+ # watch logs
+ file { '/etc/check_mk/logwatch.d/tapicero.cfg':
+ source => 'puppet:///modules/site_check_mk/agent/logwatch/tapicero.cfg',
}
# local nagios plugin checks via mrpe
- file_line {
+ augeas {
'Tapicero_Procs':
- line => 'Tapicero_Procs /usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -a tapicero',
- path => '/etc/check_mk/mrpe.cfg';
-
+ incl => '/etc/check_mk/mrpe.cfg',
+ lens => 'Spacevars.lns',
+ changes => [
+ 'rm /files/etc/check_mk/mrpe.cfg/Tapicero_Procs',
+ 'set Tapicero_Procs "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -a tapicero"' ],
+ require => File['/etc/check_mk/mrpe.cfg'];
'Tapicero_Heartbeat':
- line => 'Tapicero_Heartbeat /usr/local/lib/nagios/plugins/check_last_regex_in_log -f /var/log/syslog -r "tapicero" -w 300 -c 600',
- path => '/etc/check_mk/mrpe.cfg';
+ incl => '/etc/check_mk/mrpe.cfg',
+ lens => 'Spacevars.lns',
+ changes => 'set Tapicero_Heartbeat \'/usr/local/lib/nagios/plugins/check_last_regex_in_log -f /var/log/leap/tapicero.log -r "tapicero" -w 300 -c 600\'',
+ require => File['/etc/check_mk/mrpe.cfg'];
}
-
}
diff --git a/puppet/modules/site_check_mk/manifests/agent/webapp.pp b/puppet/modules/site_check_mk/manifests/agent/webapp.pp
index 88c3da30..9bf3b197 100644
--- a/puppet/modules/site_check_mk/manifests/agent/webapp.pp
+++ b/puppet/modules/site_check_mk/manifests/agent/webapp.pp
@@ -7,11 +7,9 @@ class site_check_mk::agent::webapp {
ensure => absent
}
- # check syslog
- concat::fragment { 'syslog_webapp':
- source => 'puppet:///modules/site_check_mk/agent/logwatch/syslog/webapp.cfg',
- target => '/etc/check_mk/logwatch.d/syslog.cfg',
- order => '02';
+ # watch logs
+ file { '/etc/check_mk/logwatch.d/webapp.cfg':
+ source => 'puppet:///modules/site_check_mk/agent/logwatch/webapp.cfg',
}
}