lib/zabbix-ruby-client/plugins/mysqlcommand.rb in zabbix-ruby-client-0.0.22 vs lib/zabbix-ruby-client/plugins/mysqlcommand.rb in zabbix-ruby-client-0.0.23
- old
+ new
@@ -4,13 +4,13 @@
module Plugins
module Mysqlcommand
extend self
def collect(*args)
- host = args.delete
- app = args.delete
- mysqldb = args.delete
- mysqlargs = args.delete
+ host = args.shift
+ app = args.shift
+ mysqldb = args.shift
+ mysqlargs = args.shift
mysqlcommand = "mysql #{mysqlargs} -s --skip-column-names -e \"%s\" #{mysqldb}"
back = []
Hash[*args].each do |name, command|
time = Time.now.to_i
comm = sprintf(mysqlcommand, command.gsub(/"/,'\"'))