Signed-off-by: Stephen Gran <steve@lobefin.net>
case $kernel {
Linux: { include entropykey }
}
-
+ if $::postgres84 {
+ include postgres
+ } elsif $::postgres90 {
+ include postgres
+ }
}
# vim:set et:
FileTest.exist?("/usr/lib/postgresql/8.3/bin/postgres")
end
end
+Facter.add("postgres84") do
+ setcode do
+ FileTest.exist?("/usr/lib/postgresql/8.4/bin/postgres")
+ end
+end
+Facter.add("postgres90") do
+ setcode do
+ FileTest.exist?("/usr/lib/postgresql/9.0/bin/postgres")
+ end
+end
Facter.add("postgrey") do
setcode do
FileTest.exist?("/usr/sbin/postgrey")
--- /dev/null
+[postgres_connections_db]
+user postgres
+
+[postgres_size_*]
+user postgres
+
+[postgres_cache_*]
+user postgres
+
+[postgres_querylength_*]
+user postgres
+
+[postgres_bgwriter]
+user postgres
--- /dev/null
+class postgres {
+ activate_munin_check {
+ "postgres_bgwriter":;
+ "postgres_connections_db":;
+ "postgres_cache_ALL": script => "postgres_cache_";
+ "postgres_querylength_ALL": script => "postgres_querylength_";
+ "postgres_size_ALL": script => "postgres_size_";
+ }
+ file {
+ "/etc/munin/plugin-conf.d/local-postgres":
+ source => "puppet:///modules/postgres/plugin.conf",
+ ;
+ }
+}
+
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
+