]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/munin/files/default/plugins/api_calls_num
nominatim: install secondary importance file
[chef.git] / cookbooks / munin / files / default / plugins / api_calls_num
diff --git a/cookbooks/munin/files/default/plugins/api_calls_num b/cookbooks/munin/files/default/plugins/api_calls_num
deleted file mode 100755 (executable)
index 443af2c..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/ruby
-
-require "json"
-
-CALL_TYPES = {
-  :map => "Map API calls",
-  :upload => "Changeset diff uploads",
-  :amf => "AMF API calls",
-  :history => "Element history fetches",
-  :full => "Full element fetches",
-  :trkpts => "GPX trackpoints calls",
-  :web => "Web site traffic",
-  :other => "Other API calls"
-}
-
-if ARGV[0] == "config"
-  puts "graph_title Requests processed"
-  puts "graph_args --base 1000"
-  puts "graph_vlabel Number of requests per ${graph_period}"
-  puts "graph_category api"
-
-  CALL_TYPES.each do |type, label|
-    puts "#{type}.label #{label}"
-    puts "#{type}.type DERIVE"
-    puts "#{type}.min 0"
-  end
-else
-  statistics = JSON.parse(File.read("/srv/www.openstreetmap.org/rails/tmp/statistics.json"))
-
-  CALL_TYPES.keys.each do |type|
-    count = statistics["uri"][type.to_s] || 0
-    puts "#{type}.value #{count}"
-  end
-end