Sha256: 720bb5f06dcdb09ec23aa3c7221fbd01e630aadb8701184dc2426f25e9b3c60d
Contents?: true
Size: 579 Bytes
Versions: 52
Compression:
Stored size: 579 Bytes
Contents
name "disk" always_start true collect :platform => 'windows' do disks = WMI::Win32_LogicalDisk.find(:all) disks.each do |disk| ld_info = {} disk.properties_.each do |p| ld_info[p.name.wmi_underscore.to_sym] = disk.send(p.name) end event( :service => "disk usage #{ld_info[:name]} #{ld_info[:volume_name]}", :metric => 100 * (1 - ld_info[:free_space].to_f / ld_info[:size].to_f), :desc => "Использование диска #{ld_info[:name]} (#{ld_info[:volume_name]})", :warning => 75, :critical => 80 ) end end
Version data entries
52 entries across 52 versions & 1 rubygems