lib/zabbix-ruby-client/plugins/redis.rb in zabbix-ruby-client-0.1.2 vs lib/zabbix-ruby-client/plugins/redis.rb in zabbix-ruby-client-0.1.3
- old
+ new
@@ -3,10 +3,11 @@
module ZabbixRubyClient
module Plugins
module Redis
extend self
+ extend ZabbixRubyClient::PluginBase
def collect(*args)
host = args[0]
redis = args[1] || 'redis-cli'
opts = args[2] || ""
@@ -18,10 +19,9 @@
return []
end
info[:keyspace_total] = info[:keyspace_hits].to_i + info[:keyspace_misses].to_i
- time = Time.now.to_i
back = []
back << "#{host} redis[role] #{time} #{info[:role]}"
back << "#{host} redis[version] #{time} #{info[:redis_version]}"
back << "#{host} redis[used_memory] #{time} #{info[:used_memory]}"
back << "#{host} redis[connections] #{time} #{info[:total_connections_received]}"