X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/4d44cd7ab6a71b30304c26703b3e4f89738cc345..404d99d4c12f76fb3e15f165aaec45679c4be2fc:/cookbooks/munin/files/default/plugins/api_calls_num?ds=sidebyside diff --git a/cookbooks/munin/files/default/plugins/api_calls_num b/cookbooks/munin/files/default/plugins/api_calls_num index 443af2c19..e776505d2 100755 --- a/cookbooks/munin/files/default/plugins/api_calls_num +++ b/cookbooks/munin/files/default/plugins/api_calls_num @@ -11,7 +11,7 @@ CALL_TYPES = { :trkpts => "GPX trackpoints calls", :web => "Web site traffic", :other => "Other API calls" -} +}.freeze if ARGV[0] == "config" puts "graph_title Requests processed" @@ -27,7 +27,7 @@ if ARGV[0] == "config" else statistics = JSON.parse(File.read("/srv/www.openstreetmap.org/rails/tmp/statistics.json")) - CALL_TYPES.keys.each do |type| + CALL_TYPES.each_key do |type| count = statistics["uri"][type.to_s] || 0 puts "#{type}.value #{count}" end