[Groonga-commit] groonga/groonga at 8fe1d10 [master] munin: support "suggest" capabilities as Wildcard plugin

Back to archive index

HAYASHI Kentaro null+****@clear*****
Thu Dec 26 15:16:10 JST 2013


HAYASHI Kentaro	2013-12-26 15:16:10 +0900 (Thu, 26 Dec 2013)

  New Revision: 8fe1d10d1c5673e5671af5037bce62e8b8e53701
  https://github.com/groonga/groonga/commit/8fe1d10d1c5673e5671af5037bce62e8b8e53701

  Message:
    munin: support "suggest" capabilities as Wildcard plugin
    
    see following URLs:
    http://munin-monitoring.org/wiki/PluginWildcard
    http://www.clear-code.com/blog/2010/4/8.html

  Modified files:
    data/munin/groonga_cpu_load
    data/munin/groonga_cpu_time
    data/munin/groonga_disk
    data/munin/groonga_memory
    data/munin/groonga_n_records
    data/munin/groonga_query_performance
    data/munin/groonga_status
    data/munin/groonga_throughput
    packages/debian/groonga-munin-plugin.conf
    packages/debian/groonga-munin-plugins.links

  Modified: data/munin/groonga_cpu_load (+6 -1)
===================================================================
--- data/munin/groonga_cpu_load    2013-12-26 14:37:12 +0900 (7e8a017)
+++ data/munin/groonga_cpu_load    2013-12-26 15:16:10 +0900 (396099c)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #%# family=auto
-#%# capabilities=autoconf
+#%# capabilities=autoconf suggest
 
 case "$1" in
     autoconf|detect)
@@ -16,6 +16,11 @@ case "$1" in
 	    exit 1
         fi
         ;;
+    suggest)
+	echo "gqtp"
+	echo "http"
+	exit 0
+	;;
     config)
 	if [ -z "${label}" ]; then
 	    title="groonga: CPU load"

  Modified: data/munin/groonga_cpu_time (+5 -1)
===================================================================
--- data/munin/groonga_cpu_time    2013-12-26 14:37:12 +0900 (f6d68ee)
+++ data/munin/groonga_cpu_time    2013-12-26 15:16:10 +0900 (e38e30e)
@@ -1,7 +1,7 @@
 #!/usr/bin/env ruby
 
 #%# family=auto
-#%# capabilities=autoconf
+#%# capabilities=autoconf suggest
 
 label = ENV["label"]
 pid_file = ENV["pid_file"]
@@ -36,6 +36,10 @@ cpu_time.label CPU time
 cpu_time.type GAUGE
 EOF
   exit(true)
+when "suggest"
+  puts "gqtp"
+  puts "http"
+  exit(true)
 end
 
 groonga_pid = File.read(pid_file).strip

  Modified: data/munin/groonga_disk (+5 -1)
===================================================================
--- data/munin/groonga_disk    2013-12-26 14:37:12 +0900 (8fec0be)
+++ data/munin/groonga_disk    2013-12-26 15:16:10 +0900 (492207b)
@@ -1,7 +1,7 @@
 #!/usr/bin/env ruby
 
 #%# family=auto
-#%# capabilities=autoconf
+#%# capabilities=autoconf suggest
 
 require 'shellwords'
 begin
@@ -146,6 +146,10 @@ EOF
     end
   end
   exit(true)
+when "suggest"
+  puts "gqtp"
+  puts "http"
+  exit(true)
 end
 
 path = Shellwords.shellescape(@path)

  Modified: data/munin/groonga_memory (+6 -1)
===================================================================
--- data/munin/groonga_memory    2013-12-26 14:37:12 +0900 (30928ce)
+++ data/munin/groonga_memory    2013-12-26 15:16:10 +0900 (88fdd65)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #%# family=auto
-#%# capabilities=autoconf
+#%# capabilities=autoconf suggest
 
 case "$1" in
     autoconf|detect)
@@ -35,6 +35,11 @@ vsz.type GAUGE
 EOF
         exit 0
         ;;
+    suggest)
+	echo "gqtp"
+	echo "http"
+	exit 0
+	;;
     *)
 esac
 

  Modified: data/munin/groonga_n_records (+5 -1)
===================================================================
--- data/munin/groonga_n_records    2013-12-26 14:37:12 +0900 (eb64f54)
+++ data/munin/groonga_n_records    2013-12-26 15:16:10 +0900 (46614e5)
@@ -1,7 +1,7 @@
 #!/usr/bin/env ruby
 
 #%# family=auto
-#%# capabilities=autoconf
+#%# capabilities=autoconf suggest
 
 require 'shellwords'
 begin
@@ -103,6 +103,10 @@ EOF
 EOF
   end
   exit(true)
+when "suggest"
+  puts "gqtp"
+  puts "http"
+  exit(true)
 end
 
 table_list.each do |table|

  Modified: data/munin/groonga_query_performance (+5 -1)
===================================================================
--- data/munin/groonga_query_performance    2013-12-26 14:37:12 +0900 (8081d02)
+++ data/munin/groonga_query_performance    2013-12-26 15:16:10 +0900 (17299f7)
@@ -1,7 +1,7 @@
 #!/usr/bin/env ruby
 
 #%# family=auto
-#%# capabilities=autoconf
+#%# capabilities=autoconf suggest
 
 require 'English'
 require 'strscan'
@@ -41,6 +41,10 @@ average.label Average
 median.label Median
 EOF
   exit(true)
+when "suggest"
+  puts "gqtp"
+  puts "http"
+  exit(true)
 end
 
 class ReverseLineReader

  Modified: data/munin/groonga_status (+5 -1)
===================================================================
--- data/munin/groonga_status    2013-12-26 14:37:12 +0900 (ef0b5f3)
+++ data/munin/groonga_status    2013-12-26 15:16:10 +0900 (fa3d09b)
@@ -1,7 +1,7 @@
 #!/usr/bin/env ruby
 
 #%# family=auto
-#%# capabilities=autoconf
+#%# capabilities=autoconf suggest
 
 require 'net/http'
 begin
@@ -87,6 +87,10 @@ alloc_count.label alloc count
 alloc_count.type GAUGE
 EOF
   exit(true)
+when "suggest"
+  puts "gqtp"
+  puts "http"
+  exit(true)
 end
 
 success, body = run("status")

  Modified: data/munin/groonga_throughput (+5 -1)
===================================================================
--- data/munin/groonga_throughput    2013-12-26 14:37:12 +0900 (5efb8ad)
+++ data/munin/groonga_throughput    2013-12-26 15:16:10 +0900 (55d922a)
@@ -1,7 +1,7 @@
 #!/usr/bin/env ruby
 
 #%# family=auto
-#%# capabilities=autoconf
+#%# capabilities=autoconf suggest
 
 begin
   require 'json'
@@ -96,6 +96,10 @@ n_queries.label N queries
 n_queries.type COUNTER
 EOF
   exit(true)
+when "suggest"
+  puts "gqtp"
+  puts "http"
+  exit(true)
 end
 
 success, body = run("status")

  Modified: packages/debian/groonga-munin-plugin.conf (+2 -4)
===================================================================
--- packages/debian/groonga-munin-plugin.conf    2013-12-26 14:37:12 +0900 (fb4890b)
+++ packages/debian/groonga-munin-plugin.conf    2013-12-26 15:16:10 +0900 (434ce1a)
@@ -4,14 +4,12 @@
   env.PATH /usr/bin:/bin:/usr/local/bin
   env.path /var/lib/groonga/db/db
   env.host 127.0.0.1
-
-[groonga_http_*]
-  env.protocol http
   env.port 10041
+  env.protocol http
   env.pid_file /var/run/groonga/groonga-http.pid
   env.log_path /var/log/groonga/query-http.log
 
-[groonga_gqtp_*]
+[groonga_*_gqtp]
   env.protocol gqtp
   env.port 10043
   env.pid_file /var/run/groonga/groonga-gqtp.pid

  Modified: packages/debian/groonga-munin-plugins.links (+8 -16)
===================================================================
--- packages/debian/groonga-munin-plugins.links    2013-12-26 14:37:12 +0900 (59edffb)
+++ packages/debian/groonga-munin-plugins.links    2013-12-26 15:16:10 +0900 (ba937bb)
@@ -1,16 +1,8 @@
-usr/share/groonga/munin/plugins/groonga_cpu_load /usr/share/munin/plugins/groonga_gqtp_cpu_load
-usr/share/groonga/munin/plugins/groonga_cpu_time /usr/share/munin/plugins/groonga_gqtp_cpu_time
-usr/share/groonga/munin/plugins/groonga_disk /usr/share/munin/plugins/groonga_gqtp_disk
-usr/share/groonga/munin/plugins/groonga_memory /usr/share/munin/plugins/groonga_gqtp_memory
-usr/share/groonga/munin/plugins/groonga_n_records /usr/share/munin/plugins/groonga_gqtp_n_records
-usr/share/groonga/munin/plugins/groonga_query_performance /usr/share/munin/plugins/groonga_gqtp_query_performance
-usr/share/groonga/munin/plugins/groonga_status /usr/share/munin/plugins/groonga_gqtp_status
-usr/share/groonga/munin/plugins/groonga_throughput /usr/share/munin/plugins/groonga_gqtp_throughput
-usr/share/groonga/munin/plugins/groonga_cpu_load /usr/share/munin/plugins/groonga_http_cpu_load
-usr/share/groonga/munin/plugins/groonga_cpu_time /usr/share/munin/plugins/groonga_http_cpu_time
-usr/share/groonga/munin/plugins/groonga_disk /usr/share/munin/plugins/groonga_http_disk
-usr/share/groonga/munin/plugins/groonga_memory /usr/share/munin/plugins/groonga_http_memory
-usr/share/groonga/munin/plugins/groonga_n_records /usr/share/munin/plugins/groonga_http_n_records
-usr/share/groonga/munin/plugins/groonga_query_performance /usr/share/munin/plugins/groonga_http_query_performance
-usr/share/groonga/munin/plugins/groonga_status /usr/share/munin/plugins/groonga_http_status
-usr/share/groonga/munin/plugins/groonga_throughput /usr/share/munin/plugins/groonga_http_throughput
+usr/share/groonga/munin/plugins/groonga_cpu_load /usr/share/munin/plugins/groonga_cpu_load_
+usr/share/groonga/munin/plugins/groonga_cpu_time /usr/share/munin/plugins/groonga_cpu_time_
+usr/share/groonga/munin/plugins/groonga_disk /usr/share/munin/plugins/groonga_disk_
+usr/share/groonga/munin/plugins/groonga_memory /usr/share/munin/plugins/groonga_memory_
+usr/share/groonga/munin/plugins/groonga_n_records /usr/share/munin/plugins/groonga_n_records_
+usr/share/groonga/munin/plugins/groonga_query_performance /usr/share/munin/plugins/groonga_query_performance_
+usr/share/groonga/munin/plugins/groonga_status /usr/share/munin/plugins/groonga_status_
+usr/share/groonga/munin/plugins/groonga_throughput /usr/share/munin/plugins/groonga_throughput_
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index