summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2010-05-07 10:41:47 -0400
committerMicah Anderson <micah@riseup.net>2010-05-07 10:41:47 -0400
commita5b6a893b494033eec5c4bec9a8aa89bf65a9571 (patch)
tree02aaaf50024b1f5dbdf2c8df0ddfd63ad963dd36
parent19f55b34ead0dddb87bc45a45779ce971da31b57 (diff)
allow for munin plugin configuration overrides, update README to reflect this and remove redundant README info from comments
-rw-r--r--README9
-rw-r--r--manifests/init.pp28
2 files changed, 28 insertions, 9 deletions
diff --git a/README b/README
index c3e40b0..7f39265 100644
--- a/README
+++ b/README
@@ -16,9 +16,18 @@ Getting started
Simply do 'include passenger' and it will be installed.
+Configuration
+-------------
+
If you need to install a specific version of passenger or
librack-ruby, you can specify the version to be installed by providing
a variable, for example:
$passenger_ensure_version = "2.2.3-2~bpo50+1"
$librack-ruby_ensure_version = "1.0.0-2~bpo50+1"
+
+If you need to set different munin plugin configuration values, you
+can also do so as follows:
+
+$passenger_memory_munin_config = "user root\nenv.passenger_memory_stats /opt/bin/passenger-memory-stats"
+$passenger_stats_munin_config = "user root\nenv.PASSENGER_TMPDIR=/var/tmp\n"
diff --git a/manifests/init.pp b/manifests/init.pp
index a5f3fcc..3078cfe 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -6,16 +6,19 @@
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
-#
-# If you need to install a specific version of passenger or
-# librack-ruby, you can specify the version to be installed by
-# providing a variable, for example:
-#
-# $passenger_ensure_version = "2.2.3-2~bpo50+1"
-# $librack_ensure_version = "1.0.0-2~bpo50+1"
class passenger {
+ $real_passenger_memory_munin_config = $passenger_memory_munin_config ? {
+ '' => "user root\nenv.passenger_memory_stats /usr/sbin/passenger-memory-stats",
+ default => $passenger_memory_munin_config,
+ }
+
+ $real_passenger_stats_munin_config = $passenger_stats_munin_config ? {
+ '' => "user root",
+ default => $passenger_stats_munin_config,
+ }
+
if !defined(Package["libapache2-mod-passenger"]) {
if $passenger_ensure_version == '' { $passenger_ensure_version = 'installed' }
package {
@@ -38,9 +41,16 @@ class passenger {
munin::plugin::deploy {
'passenger_memory_stats':
source => "passenger/munin/passenger_memory_stats",
- config => "user root\nenv.passenger_memory_stats /usr/sbin/passenger-memory-stats";
+ config => $real_passenger_memory_munin_config;
'passenger_stats':
source => "passenger/munin/passenger_stats",
- config => "user root";
+ config => $real_passenger_stats_munin_config;
+ }
+}
+
+test::deploy {
+ 'passenger_memory_stats':
+ source => "test/deploythis",
+ config => $passenger_munin_config
}
}