lib/reporter/default/stats_disk.rb in onering-report-plugins-0.0.25 vs lib/reporter/default/stats_disk.rb in onering-report-plugins-0.0.26
- old
+ new
@@ -106,12 +106,16 @@
#
end
end
- stat :disk, {
- :mounts => (Hash[mounts.select{|k,v| k =~ /^\/dev\/((h|s|xv|v)d|mapper|vgc)/ }].values rescue nil),
- :lvm => {
- :groups => vg.values
- }
- }
-end
\ No newline at end of file
+ d = {}
+
+ d[:mounts] = (Hash[mounts.select{|k,v| k =~ /^\/dev\/((h|s|xv|v)d|mapper|vgc)/ }].values rescue nil)
+ d[:lvm] = {
+ :groups => vg.values
+ } unless vg.values.empty?
+
+ d[:smart] = Facter.value('smart')
+
+ stat :disk, d.compact
+end