Note that exim contains tracker-specific configuration
[mirror/dsa-puppet.git] / modules / postgres / manifests / init.pp
1 # base class for a host with postgres installed
2 #
3 # This just provides some common infrastructure and monitoring.
4 class postgres {
5   $ensure = ($::postgres) ? {
6     true    => 'present',
7     default => 'absent'
8   }
9
10   munin::check { 'postgres_bgwriter':
11     ensure => $ensure,
12     }
13   munin::check { 'postgres_connections_db':
14     ensure => $ensure,
15     }
16   munin::check { 'postgres_cache_ALL':
17     ensure => $ensure,
18     script => 'postgres_cache_'
19   }
20   munin::check { 'postgres_querylength_ALL':
21     ensure => $ensure,
22     script => 'postgres_querylength_'
23   }
24   munin::check { 'postgres_size_ALL':
25     ensure => $ensure,
26     script => 'postgres_size_'
27   }
28
29   file { '/etc/munin/plugin-conf.d/local-postgres':
30     ensure => $ensure,
31     source => 'puppet:///modules/postgres/plugin.conf',
32   }
33   file { '/usr/local/sbin/dsa-restart-all-idle-postgres':
34     ensure => $ensure,
35     source => 'puppet:///modules/postgres/dsa-restart-all-idle-postgres',
36     mode   => '0555',
37   }
38 }