null+****@clear*****
null+****@clear*****
2010年 6月 21日 (月) 09:40:18 JST
Kouhei Sutou 2010-06-21 00:40:18 +0000 (Mon, 21 Jun 2010)
New Revision: 1d442043b400678d8df93692d89ce9704af745d4
Log:
report message on error.
Modified files:
data/munin/groonga_n_records
Modified: data/munin/groonga_n_records (+8 -2)
===================================================================
--- data/munin/groonga_n_records 2010-06-20 22:14:53 +0000 (967e14d)
+++ data/munin/groonga_n_records 2010-06-21 00:40:18 +0000 (a0c48c2)
@@ -70,7 +70,10 @@ graph_category groonga
graph_info number of records in groonga table
EOF
success, body = run("table_list")
- exit(false) unless success
+ unless success
+ puts "error: #{body}"
+ exit(false)
+ end
parse_list(body[0], body[1..-1]).each do |table|
name = table["name"]
puts <<EOF
@@ -87,7 +90,10 @@ exit(false) unless success
parse_list(body[0], body[1..-1]).each do |table|
name = table["name"]
success, body = run("select", "#{name} --limit 0")
- exit(false) unless success
+ unless success
+ puts("error: #{body}")
+ exit(false)
+ end
n_records = body[0][0][0]
puts <<EOF
#{name}.value #{n_records}