Module: HostStatusNameConcerneable
- Defined in:
- app/concerns/host_status_name_concerneable.rb
Instance Attribute Summary collapse
-
#hostname ⇒ Object
Returns the value of attribute hostname.
-
#resource ⇒ Object
Returns the value of attribute resource.
-
#service_name ⇒ Object
Returns the value of attribute service_name.
Instance Method Summary collapse
Instance Attribute Details
#hostname ⇒ Object
Returns the value of attribute hostname.
3 4 5 |
# File 'app/concerns/host_status_name_concerneable.rb', line 3 def hostname @hostname end |
#resource ⇒ Object
Returns the value of attribute resource.
3 4 5 |
# File 'app/concerns/host_status_name_concerneable.rb', line 3 def resource @resource end |
#service_name ⇒ Object
Returns the value of attribute service_name.
3 4 5 |
# File 'app/concerns/host_status_name_concerneable.rb', line 3 def service_name @service_name end |
Instance Method Details
#status ⇒ Object
5 6 7 8 9 |
# File 'app/concerns/host_status_name_concerneable.rb', line 5 def status @status ||= Nagira::HostStatusController.new(@nagios_status, hostname: hostname, output: :full) .status[hostname][resource] end |
#with_service_name ⇒ Object
11 12 13 14 15 16 17 |
# File 'app/concerns/host_status_name_concerneable.rb', line 11 def with_service_name if service_name { service_name => status[service_name] } else status end end |