X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/4d44cd7ab6a71b30304c26703b3e4f89738cc345..7f5c025954a0868b7ac2aea8722089e75c39668e:/cookbooks/munin/files/default/plugins/api_calls_status?ds=inline diff --git a/cookbooks/munin/files/default/plugins/api_calls_status b/cookbooks/munin/files/default/plugins/api_calls_status index 6d0e619ed..4a9623f9b 100755 --- a/cookbooks/munin/files/default/plugins/api_calls_status +++ b/cookbooks/munin/files/default/plugins/api_calls_status @@ -19,11 +19,12 @@ HTTP_STATUSES = { "410" => "Gone", "412" => "Precondition Failed", "416" => "Requested Range Not Satisfiable", + "422" => "Unprocessable Entity", "500" => "Internal Server Error", "502" => "Bad Gateway", "503" => "Service Unavailable", "509" => "Bandwidth Limit Exceeded" -} +}.freeze if ARGV[0] == "config" puts "graph_title HTTP response codes" @@ -39,7 +40,7 @@ if ARGV[0] == "config" else statistics = JSON.parse(File.read("/srv/www.openstreetmap.org/rails/tmp/statistics.json")) - HTTP_STATUSES.keys.each do |code| + HTTP_STATUSES.each_key do |code| count = statistics["status"][code] || 0 puts "http#{code}.value #{count}" end