Kouhei Sutou
null+****@clear*****
Thu May 23 11:10:35 JST 2013
Kouhei Sutou 2013-05-23 11:10:35 +0900 (Thu, 23 May 2013) New Revision: 0b6fec93910c7b55a63651b648cc53a7ced6550e https://github.com/groonga/groonga/commit/0b6fec93910c7b55a63651b648cc53a7ced6550e Message: munin: apply exclude_tables to "config" output Modified files: data/munin/groonga_n_records Modified: data/munin/groonga_n_records (+15 -13) =================================================================== --- data/munin/groonga_n_records 2013-05-23 10:22:39 +0900 (faf64ec) +++ data/munin/groonga_n_records 2013-05-23 11:10:35 +0900 (eb64f54) @@ -59,6 +59,19 @@ def parse_list(header, list) end end +def table_list + success, body = run("table_list") + unless success + puts "error: #{body}" + exit(false) + end + tables = parse_list(body[0], body[1..-1]) + tables.reject do |table| + name = table["name"] + @exclude_tables.include?(name) + end +end + case command when "autoconf", "detect" success, body = run("status") @@ -81,12 +94,7 @@ graph_vlabel records graph_category groonga graph_info number of records in groonga table EOF - success, body = run("table_list") - unless success - puts "error: #{body}" - exit(false) - end - parse_list(body[0], body[1..-1]).each do |table| + table_list.each do |table| name = table["name"] puts <<EOF @@ -97,14 +105,8 @@ EOF exit(true) end -success, body = run("table_list") -unless success - puts("error: #{body}") - exit(false) -end -parse_list(body[0], body[1..-1]).each do |table| +table_list.each do |table| name = table["name"] - next if @exclude_tables.include?(name) success, body = run("select", "#{name} --limit 0") unless success puts("error: #{body}") -------------- next part -------------- HTML����������������������������... Download