3 # This class installs and configures monit
10 if $::lsbmajdistrelease <= 7 {
15 augeas { 'inittab_monit':
16 context => '/files/etc/inittab',
18 'set mo/runlevels 2345',
19 'set mo/action respawn',
20 "set mo/process \"/usr/bin/monit -d 300 -I -c /etc/monit/monitrc -s /var/lib/monit/monit.state\"",
22 notify => Exec['init q'],
29 notify => Exec['service monit stop'],
30 require => Package['monit'],
32 file { '/etc/monit/monit.d':
37 file { '/etc/monit/monitrc':
38 content => template('monit/monitrc.erb'),
41 file { '/etc/monit/monit.d/01puppet':
42 source => 'puppet:///modules/monit/puppet',
45 file { '/etc/monit/monit.d/00debian.org':
46 source => 'puppet:///modules/monit/debianorg',
49 file { '/etc/default/monit':
50 content => template('monit/default.erb'),
51 require => Package['monit'],
52 notify => Exec['service monit stop']
55 exec { 'service monit stop':
62 file { [ '/etc/monit/',
64 '/etc/monit/monit.d/01puppet',
65 '/etc/monit/monit.d/00debian.org'