lib/zabbix-ruby-client/plugins/apache.rb in zabbix-ruby-client-0.1.2 vs lib/zabbix-ruby-client/plugins/apache.rb in zabbix-ruby-client-0.1.3

- old
+ new

@@ -2,17 +2,17 @@ module ZabbixRubyClient module Plugins module Apache extend self + extend ZabbixRubyClient::PluginBase def collect(*args) host = args[0] ret = get_status ret['Score'] = get_scores(ret["Scoreboard"]) ret.delete "Scoreboard" - time = Time.now.to_i back = [] back << "#{host} apache[TotalAccesses] #{time} #{ret["Total Accesses"]}" back << "#{host} apache[TotalKBytes] #{time} #{ret["Total kBytes"]}" back << "#{host} apache[CPULoad] #{time} #{ret["CPULoad"].to_f}" back << "#{host} apache[Uptime] #{time} #{ret["Uptime"]}"