summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authork clair <kclair@riseup.net>2012-09-21 16:40:50 -0700
committerk clair <kclair@riseup.net>2012-09-21 16:40:50 -0700
commit7e785fedf29b1c245337504fd2566aae71adf1e6 (patch)
tree8cb82a41681991e75ca8fbe2a8a14f94875de3c9
parent36880215a81b3cbeea224bf08c056406cf7d0fb4 (diff)
have passenger_stats munin script take an environment variable for the location of passenger-status
-rwxr-xr-xfiles/munin/passenger_stats4
1 files changed, 3 insertions, 1 deletions
diff --git a/files/munin/passenger_stats b/files/munin/passenger_stats
index a117903..f06e88a 100755
--- a/files/munin/passenger_stats
+++ b/files/munin/passenger_stats
@@ -1,5 +1,7 @@
#!/usr/bin/env ruby
+PASSENGER_STATUS = ENV['passenger_status'] || '/usr/local/bin/passenger-status'
+
def output_config
puts <<-END
graph_category Passenger
@@ -16,7 +18,7 @@ END
end
def output_values
- status = `/usr/sbin/passenger-status`
+ status = `#{PASSENGER_STATUS}`
unless $?.success?
$stderr.puts "failed executing passenger-status"
exit 1