X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/7b9ec4b60ee39614d1d083d7220e76b07d2b275f..ff044920428608b2c04507ad52d6ab52c9d6555f:/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 index b0c23664b..d2f7ea372 100755 --- a/cookbooks/munin/files/default/plugins/api_calls_num +++ b/cookbooks/munin/files/default/plugins/api_calls_num @@ -28,19 +28,19 @@ def uris_from_logs end CALL_TYPES = { - :map => "Map API calls", - :upload => "Changeset diff uploads", - :amf => "AMF API calls", - :history => "Element history fetches", + :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", + :web => "Web site traffic", :other => "Other API calls" } def categorise_uri(line) uri = line.split(" ")[1] - + case uri when /api\/0\.6\/map/ then :map when /api\/0\.6\/changeset\/[0-9]*\/upload/ then :upload @@ -72,7 +72,7 @@ else end h end - + CALL_TYPES.keys.each do |type| count = counts[type] || 0 puts "#{type}.value #{count / delta_t}"