Class: IcingaResult::CheckResult
- Inherits:
-
Object
- Object
- IcingaResult::CheckResult
- Defined in:
- lib/icinga_result/check_result.rb
Overview
Contains the result of a check
Instance Attribute Summary collapse
-
#message ⇒ Object
Returns the value of attribute message.
-
#performance_data ⇒ Object
Returns the value of attribute performance_data.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(status, message, performance_data = '') ⇒ CheckResult
constructor
A new instance of CheckResult.
Constructor Details
#initialize(status, message, performance_data = '') ⇒ CheckResult
6 7 8 9 10 |
# File 'lib/icinga_result/check_result.rb', line 6 def initialize(status, , performance_data = '') @status = status = @performance_data = performance_data end |
Instance Attribute Details
#message ⇒ Object
Returns the value of attribute message.
4 5 6 |
# File 'lib/icinga_result/check_result.rb', line 4 def end |
#performance_data ⇒ Object
Returns the value of attribute performance_data.
4 5 6 |
# File 'lib/icinga_result/check_result.rb', line 4 def performance_data @performance_data end |
#status ⇒ Object
Returns the value of attribute status.
4 5 6 |
# File 'lib/icinga_result/check_result.rb', line 4 def status @status end |
Instance Method Details
#data ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/icinga_result/check_result.rb', line 12 def data data = { 'exit_status': @status, 'plugin_output': } data['performance_data'] = @performance_data if @performance_data && !@performance_data.empty? data end |