2 # put in /etc/munin/plugins and restart munin-node
3 # by Dan Manges, http://www.dcmanges.com/blog/rails-application-visualization-with-munin
4 # NOTE: you might need to add munin to allow passwordless sudo for passenger-memory-stats
10 graph_args --base 1024 -l 0 --vertical-label bytes --upper-limit 4056231936
11 graph_category passenger
12 graph_title Passenger memory
20 status = `/usr/sbin/passenger-memory-stats | tail -1`
21 unless $CHILD_STATUS.success?
22 $stderr.puts "failed executing passenger-memory-stats"
25 status =~ /(\d+\.\d+)/
26 puts "memory.value #{(Regexp.last_match[1].to_f * 1024 * 1024).round}"
29 if ARGV[0] == "config"