Class: HealthMode::DiskSpaceMetric

Inherits:
Metric
  • Object
show all
Defined in:
lib/metrics/disk_space_metric.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.free_disk_spaceObject

Returns the value of attribute free_disk_space.



4
5
6
# File 'lib/metrics/disk_space_metric.rb', line 4

def free_disk_space
  @free_disk_space
end

.percentage_disk_space_usedObject

Returns the value of attribute percentage_disk_space_used.



4
5
6
# File 'lib/metrics/disk_space_metric.rb', line 4

def percentage_disk_space_used
  @percentage_disk_space_used
end

.system_metricsObject

Returns the value of attribute system_metrics.



4
5
6
# File 'lib/metrics/disk_space_metric.rb', line 4

def system_metrics
  @system_metrics
end

.total_disk_spaceObject

Returns the value of attribute total_disk_space.



4
5
6
# File 'lib/metrics/disk_space_metric.rb', line 4

def total_disk_space
  @total_disk_space
end

.used_disk_spaceObject

Returns the value of attribute used_disk_space.



4
5
6
# File 'lib/metrics/disk_space_metric.rb', line 4

def used_disk_space
  @used_disk_space
end

Class Method Details

.current_stateObject



10
11
12
13
14
15
16
17
18
# File 'lib/metrics/disk_space_metric.rb', line 10

def current_state
  refresh_state
  {
    "disk_total" => @total_disk_space,
    "disk_used" => @used_disk_space,
    "disk_free" => @free_disk_space,
    "disk_used_percentage" => @percentage_disk_space_used
  }
end