Class: CustomMonitoring
- Inherits:
-
Object
- Object
- CustomMonitoring
- Defined in:
- lib/monitor/client/custom/custom_monitoring.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#param ⇒ Object
Returns the value of attribute param.
Instance Method Summary collapse
- #active? ⇒ Boolean
- #get_state ⇒ Object
-
#initialize(st, name, param, sev) ⇒ CustomMonitoring
constructor
A new instance of CustomMonitoring.
- #raw_severity ⇒ Object
-
#request(node) ⇒ Object
compute the value.
- #severity ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(st, name, param, sev) ⇒ CustomMonitoring
Returns a new instance of CustomMonitoring.
5 6 7 8 9 10 11 |
# File 'lib/monitor/client/custom/custom_monitoring.rb', line 5 def initialize (st, name, param, sev) @state=st @name=name #index of $status @severity=sev @param=param end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/monitor/client/custom/custom_monitoring.rb', line 3 def name @name end |
#param ⇒ Object
Returns the value of attribute param.
3 4 5 |
# File 'lib/monitor/client/custom/custom_monitoring.rb', line 3 def param @param end |
Instance Method Details
#active? ⇒ Boolean
17 18 19 |
# File 'lib/monitor/client/custom/custom_monitoring.rb', line 17 def active?() return @state==1 end |
#get_state ⇒ Object
13 14 15 |
# File 'lib/monitor/client/custom/custom_monitoring.rb', line 13 def get_state() return @state end |
#raw_severity ⇒ Object
28 29 30 |
# File 'lib/monitor/client/custom/custom_monitoring.rb', line 28 def raw_severity() return @severity end |
#request(node) ⇒ Object
compute the value
24 25 26 |
# File 'lib/monitor/client/custom/custom_monitoring.rb', line 24 def request(node) end |
#severity ⇒ Object
32 33 34 35 |
# File 'lib/monitor/client/custom/custom_monitoring.rb', line 32 def severity() return $status[0] if !@severity return $status[@severity] end |
#to_s ⇒ Object
37 38 39 |
# File 'lib/monitor/client/custom/custom_monitoring.rb', line 37 def to_s() return "name=#{@name} state=#{@state} severity=#{@severity} parameter=#{@param}" end |