lib/zabbix-ruby-client/plugins/apache.rb in zabbix-ruby-client-0.0.6 vs lib/zabbix-ruby-client/plugins/apache.rb in zabbix-ruby-client-0.0.7

- old
+ new

@@ -9,31 +9,31 @@ 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] #{ret["Total Accesses"]}" - back << "#{host} apache[TotalKBytes] #{ret["Total kBytes"]}" - back << "#{host} apache[CPULoad] #{ret["CPULoad"].to_f}" - back << "#{host} apache[Uptime] #{ret["Uptime"]}" - back << "#{host} apache[ReqPerSec] #{ret["ReqPerSec"].to_f}" - back << "#{host} apache[BytesPerSec] #{ret["BytesPerSec"]}" - back << "#{host} apache[BytesPerReq] #{ret["BytesPerReq"]}" - back << "#{host} apache[BusyWorkers] #{ret["BusyWorkers"]}" - back << "#{host} apache[IdleWorkers] #{ret["IdleWorkers"]}" - back << "#{host} apache[c_idle] #{ret["Score"]["."]}" - back << "#{host} apache[c_waiting] #{ret["Score"]["_"]}" - back << "#{host} apache[c_closing] #{ret["Score"]["C"]}" - back << "#{host} apache[c_dns] #{ret["Score"]["D"]}" - back << "#{host} apache[c_finish] #{ret["Score"]["G"]}" - back << "#{host} apache[c_cleanup] #{ret["Score"]["I"]}" - back << "#{host} apache[c_keep] #{ret["Score"]["K"]}" - back << "#{host} apache[c_log] #{ret["Score"]["L"]}" - back << "#{host} apache[c_read] #{ret["Score"]["R"]}" - back << "#{host} apache[c_send] #{ret["Score"]["W"]}" - back << "#{host} apache[c_start] #{ret["Score"]["S"]}" - + 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"]}" + back << "#{host} apache[ReqPerSec] #{time} #{ret["ReqPerSec"].to_f}" + back << "#{host} apache[BytesPerSec] #{time} #{ret["BytesPerSec"]}" + back << "#{host} apache[BytesPerReq] #{time} #{ret["BytesPerReq"]}" + back << "#{host} apache[BusyWorkers] #{time} #{ret["BusyWorkers"]}" + back << "#{host} apache[IdleWorkers] #{time} #{ret["IdleWorkers"]}" + back << "#{host} apache[c_idle] #{time} #{ret["Score"]["."]}" + back << "#{host} apache[c_waiting] #{time} #{ret["Score"]["_"]}" + back << "#{host} apache[c_closing] #{time} #{ret["Score"]["C"]}" + back << "#{host} apache[c_dns] #{time} #{ret["Score"]["D"]}" + back << "#{host} apache[c_finish] #{time} #{ret["Score"]["G"]}" + back << "#{host} apache[c_cleanup] #{time} #{ret["Score"]["I"]}" + back << "#{host} apache[c_keep] #{time} #{ret["Score"]["K"]}" + back << "#{host} apache[c_log] #{time} #{ret["Score"]["L"]}" + back << "#{host} apache[c_read] #{time} #{ret["Score"]["R"]}" + back << "#{host} apache[c_send] #{time} #{ret["Score"]["W"]}" + back << "#{host} apache[c_start] #{time}#{ret["Score"]["S"]}" return back end private