require "English"
def output_config
- puts <<-END
-graph_args --base 1000
-graph_category passenger
-graph_title Passenger requests
-graph_vlabel requests / ${graph_period}
+ puts <<~CONFIG
+ graph_args --base 1000
+ graph_category passenger
+ graph_title Passenger requests
+ graph_vlabel requests / ${graph_period}
-requests.label requests
-requests.type DERIVE
-requests.max 1000000
-requests.min 0
-END
+ requests.label requests
+ requests.type DERIVE
+ requests.max 1000000
+ requests.min 0
+ CONFIG
exit 0
end
def output_values
status = `/usr/sbin/passenger-status`
unless $CHILD_STATUS.success?
- $stderr.puts "failed executing passenger-status"
+ warn "failed executing passenger-status"
exit 1
end
total_requests = 0