3 # This class installs and configures monit
10 if $::lsbmajdistrelease <= 7 {
15 $cmd = $::lsbdistcodename ? {
16 'squeeze' => '/usr/sbin/monit',
17 default => '/usr/bin/monit',
20 augeas { 'inittab_monit':
21 context => '/files/etc/inittab',
23 'set mo/runlevels 2345',
24 'set mo/action respawn',
25 "set mo/process \"$cmd -d 300 -I -c /etc/monit/monitrc -s /var/lib/monit/monit.state\"",
27 notify => Exec['init q'],
34 notify => Exec['service monit stop'],
35 require => Package['monit'],
37 file { '/etc/monit/monit.d':
42 file { '/etc/monit/monitrc':
43 content => template('monit/monitrc.erb'),
46 file { '/etc/monit/monit.d/01puppet':
47 source => 'puppet:///modules/monit/puppet',
50 file { '/etc/monit/monit.d/00debian.org':
51 source => 'puppet:///modules/monit/debianorg',
54 file { '/etc/default/monit':
55 content => template('monit/default.erb'),
56 require => Package['monit'],
57 notify => Exec['service monit stop']
60 exec { 'service monit stop':
67 file { [ '/etc/monit/',
69 '/etc/monit/monit.d/01puppet',
70 '/etc/monit/monit.d/00debian.org'