7   "301" => "Moved Permanently",
 
  10   "304" => "Not Modified",
 
  11   "400" => "Bad Request",
 
  12   "401" => "Unauthorized",
 
  15   "408" => "Request Timeout",
 
  18   "500" => "Internal Server Error",
 
  19   "509" => "Bandwidth Limit Exceeded"
 
  22 if ARGV[0] == "config"
 
  23   puts "graph_title HTTP response codes"
 
  24   puts "graph_args --lower-limit 0 --base 1000 --logarithmic"
 
  25   puts "graph_vlabel Number of requests per ${graph_period}"
 
  26   puts "graph_category api"
 
  28   HTTP_STATUSES.each do |code, label|
 
  29     puts "http#{code}.label #{label}"
 
  30     puts "http#{code}.type DERIVE"
 
  33   statistics = JSON.parse(File.read("/srv/www.openstreetmap.org/rails/tmp/statistics.json"))
 
  35   HTTP_STATUSES.keys.each do |code|
 
  36     count = statistics["status"][code] || 0
 
  37     puts "http#{code}.value #{count}"