From: Tom Hughes Date: Wed, 8 Apr 2015 22:01:37 +0000 (+0100) Subject: Fix some issues with aggregate graphs X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/157d98f404bf4fb5dcdf6752f807982aaf297261 Fix some issues with aggregate graphs --- diff --git a/cookbooks/munin/libraries/expand.rb b/cookbooks/munin/libraries/expand.rb index dcd73cb69..4dadd14d3 100644 --- a/cookbooks/munin/libraries/expand.rb +++ b/cookbooks/munin/libraries/expand.rb @@ -5,7 +5,7 @@ class Chef if node.is_a?(Hash) template.gsub(/%%([^%]+)%%/) { node[Regexp.last_match[1].to_sym] } else - template.gsub("%%", node) + template.gsub("%%%", node.tr("-", "_")).gsub("%%", node) end end.join(" ") end diff --git a/cookbooks/munin/templates/default/munin.conf.erb b/cookbooks/munin/templates/default/munin.conf.erb index 06ee3c917..b348a950a 100644 --- a/cookbooks/munin/templates/default/munin.conf.erb +++ b/cookbooks/munin/templates/default/munin.conf.erb @@ -119,21 +119,21 @@ unknown_limit 144 api_calls_www.graph_title Active requests api_calls_www.graph_vlabel Number of requests api_calls_www.graph_category api - api_calls_www.web.sum <%= Chef::Munin.expand "%%.openstreetmap:api_calls_%%.web", @frontends %> + api_calls_www.web.sum <%= Chef::Munin.expand "%%.openstreetmap:api_calls_%%%.web", @frontends %> api_calls_www.web.label Web site traffic - api_calls_www.upload.sum <%= Chef::Munin.expand "%%.openstreetmap:api_calls_%%.upload", @frontends %> + api_calls_www.upload.sum <%= Chef::Munin.expand "%%.openstreetmap:api_calls_%%%.upload", @frontends %> api_calls_www.upload.label Changeset diff uploads - api_calls_www.other.sum <%= Chef::Munin.expand "%%.openstreetmap:api_calls_%%.other", @frontends %> + api_calls_www.other.sum <%= Chef::Munin.expand "%%.openstreetmap:api_calls_%%%.other", @frontends %> api_calls_www.other.label Other API calls - api_calls_www.amf.sum <%= Chef::Munin.expand "%%.openstreetmap:api_calls_%%.amf", @frontends %> + api_calls_www.amf.sum <%= Chef::Munin.expand "%%.openstreetmap:api_calls_%%%.amf", @frontends %> api_calls_www.amf.label AMF API calls - api_calls_www.history.sum <%= Chef::Munin.expand "%%.openstreetmap:api_calls_%%.history", @frontends %> + api_calls_www.history.sum <%= Chef::Munin.expand "%%.openstreetmap:api_calls_%%%.history", @frontends %> api_calls_www.history.label Element history fetches - api_calls_www.full.sum <%= Chef::Munin.expand "%%.openstreetmap:api_calls_%%.full", @frontends %> + api_calls_www.full.sum <%= Chef::Munin.expand "%%.openstreetmap:api_calls_%%%.full", @frontends %> api_calls_www.full.label Full element fetches - api_calls_www.map.sum <%= Chef::Munin.expand "%%.openstreetmap:api_calls_%%.map", @frontends %> + api_calls_www.map.sum <%= Chef::Munin.expand "%%.openstreetmap:api_calls_%%%.map", @frontends %> api_calls_www.map.label Map API calls - api_calls_www.trkpts.sum <%= Chef::Munin.expand "%%.openstreetmap:api_calls_%%.trkpts", @frontends %> + api_calls_www.trkpts.sum <%= Chef::Munin.expand "%%.openstreetmap:api_calls_%%%.trkpts", @frontends %> api_calls_www.trkpts.label GPX trackpoints calls api_calls_error.graph_title HTTP errors api_calls_error.graph_vlabel Number of errors per ${graph_period} @@ -168,28 +168,28 @@ unknown_limit 144 api_waits_www.graph_title Wait times for active requests api_waits_www.graph_vlabel Average time of requests api_waits_www.graph_category api - api_waits_www.web.sum <%= Chef::Munin.expand "%%.openstreetmap:api_waits_%%.web", @frontends %> + api_waits_www.web.sum <%= Chef::Munin.expand "%%.openstreetmap:api_waits_%%%.web", @frontends %> api_waits_www.web.label Web site traffic api_waits_www.web.cdef web,2,/ - api_waits_www.upload.sum <%= Chef::Munin.expand "%%.openstreetmap:api_waits_%%.upload", @frontends %> + api_waits_www.upload.sum <%= Chef::Munin.expand "%%.openstreetmap:api_waits_%%%.upload", @frontends %> api_waits_www.upload.label Changeset diff uploads api_waits_www.upload.cdef upload,2,/ - api_waits_www.other.sum <%= Chef::Munin.expand "%%.openstreetmap:api_waits_%%.other", @frontends %> + api_waits_www.other.sum <%= Chef::Munin.expand "%%.openstreetmap:api_waits_%%%.other", @frontends %> api_waits_www.other.label Other API calls api_waits_www.other.cdef other,2,/ - api_waits_www.amf.sum <%= Chef::Munin.expand "%%.openstreetmap:api_waits_%%.amf", @frontends %> + api_waits_www.amf.sum <%= Chef::Munin.expand "%%.openstreetmap:api_waits_%%%.amf", @frontends %> api_waits_www.amf.label AMF API calls api_waits_www.amf.cdef amf,2,/ - api_waits_www.history.sum <%= Chef::Munin.expand "%%.openstreetmap:api_waits_%%.history", @frontends %> + api_waits_www.history.sum <%= Chef::Munin.expand "%%.openstreetmap:api_waits_%%%.history", @frontends %> api_waits_www.history.label Element history fetches api_waits_www.history.cdef history,2,/ - api_waits_www.full.sum <%= Chef::Munin.expand "%%.openstreetmap:api_waits_%%.full", @frontends %> + api_waits_www.full.sum <%= Chef::Munin.expand "%%.openstreetmap:api_waits_%%%.full", @frontends %> api_waits_www.full.label Full element fetches api_waits_www.full.cdef full,2,/ - api_waits_www.map.sum <%= Chef::Munin.expand "%%.openstreetmap:api_waits_%%.map", @frontends %> + api_waits_www.map.sum <%= Chef::Munin.expand "%%.openstreetmap:api_waits_%%%.map", @frontends %> api_waits_www.map.label Map API calls api_waits_www.map.cdef map,2,/ - api_waits_www.trkpts.sum <%= Chef::Munin.expand "%%.openstreetmap:api_waits_%%.trkpts", @frontends %> + api_waits_www.trkpts.sum <%= Chef::Munin.expand "%%.openstreetmap:api_waits_%%%.trkpts", @frontends %> api_waits_www.trkpts.label GPX trackpoints calls api_waits_www.trkpts.cdef trkpts,2,/ memcached_multi_bytes.graph_title Network Traffic