Sha256: 2aef7cb9c86856409f0b627add4a9d35195fd9e6ec555b6e3387e26bacec7cdf
Contents?: true
Size: 666 Bytes
Versions: 1
Compression:
Stored size: 666 Bytes
Contents
class ZabbixRubyClient module Plugins module Mysql extend self def collect(*args) host = args[0] aptcheck = `/usr/lib/update-notifier/apt-check 2>&1` if $?.to_i == 0 security, pending = aptcheck.split(/;/).map(&:to_i) else logger.warn "Are you running on ubuntu ?" return [] end time = Time.now.to_i back = [] back << "#{host} mysql[security] #{time} #{security}" back << "#{host} mysql[pending] #{time} #{pending}" return back end end end end ZabbixRubyClient::Plugins.register('mysql', ZabbixRubyClient::Plugins::Mysql)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
zabbix-ruby-client-0.0.9 | lib/zabbix-ruby-client/plugins/mysql.rb |