Sha256: c0797369e4ea2455008f41d12a15ec50a933bccb4588441f083bb15f1eba1a26

Contents?: true

Size: 807 Bytes

Versions: 52

Compression:

Stored size: 807 Bytes

Contents

<%
  @path = "/etc/munin/plugins/passenger_memory_status"
  @perms = 0755
%>#!/usr/bin/env ruby
# put in /etc/munin/plugins and restart munin-node
# by Dan Manges, http://www.dcmanges.com/blog/rails-application-visualization-with-munin
# NOTE: you might need to add munin to allow passwordless sudo for passenger-memory-stats

def output_config
  puts <<-END
graph_category App
graph_title Passenger memory stats
graph_vlabel megabytes

memory.label memory
END
  exit 0
end

def output_values
  status = `rvm exec sudo <%= rubber_env.rvm_gem_home %>/bin/passenger-memory-stats | tail -1`
  unless $?.success?
    $stderr.puts "failed executing passenger-memory-stats"
    exit 1
  end
  status =~ /(\d+\.\d+)/
  puts "memory.value #{$1}"
end

if ARGV[0] == "config"
  output_config
else
  output_values
end

Version data entries

52 entries across 25 versions & 1 rubygems

Version Path
rubber-2.1.2 templates/munin/config/rubber/role/passenger_nginx/munin-passenger-memory.conf
rubber-2.1.2 templates/munin/config/rubber/role/passenger/munin-passenger-memory.conf
rubber-2.1.1 templates/munin/config/rubber/role/passenger_nginx/munin-passenger-memory.conf
rubber-2.1.1 templates/munin/config/rubber/role/passenger/munin-passenger-memory.conf
rubber-2.1.0 templates/munin/config/rubber/role/passenger_nginx/munin-passenger-memory.conf
rubber-2.1.0 templates/munin/config/rubber/role/passenger/munin-passenger-memory.conf
rubber-2.0.8 templates/munin/config/rubber/role/passenger_nginx/munin-passenger-memory.conf
rubber-2.0.8 templates/munin/config/rubber/role/passenger/munin-passenger-memory.conf
rubber-2.0.7 templates/munin/config/rubber/role/passenger_nginx/munin-passenger-memory.conf
rubber-2.0.7 templates/munin/config/rubber/role/passenger/munin-passenger-memory.conf
rubber-2.0.6 templates/munin/config/rubber/role/passenger/munin-passenger-memory.conf
rubber-2.0.6 templates/munin/config/rubber/role/passenger_nginx/munin-passenger-memory.conf
rubber-2.0.5 templates/munin/config/rubber/role/passenger/munin-passenger-memory.conf
rubber-2.0.5 templates/munin/config/rubber/role/passenger_nginx/munin-passenger-memory.conf
rubber-2.0.4 templates/munin/config/rubber/role/passenger_nginx/munin-passenger-memory.conf
rubber-2.0.4 templates/munin/config/rubber/role/passenger/munin-passenger-memory.conf
rubber-2.0.3 templates/munin/config/rubber/role/passenger/munin-passenger-memory.conf
rubber-2.0.3 templates/munin/config/rubber/role/passenger_nginx/munin-passenger-memory.conf
rubber-2.0.2 templates/munin/config/rubber/role/passenger/munin-passenger-memory.conf
rubber-2.0.2 templates/munin/config/rubber/role/passenger_nginx/munin-passenger-memory.conf