Class: Interferon::AlertDSL
- Inherits:
-
Object
- Object
- Interferon::AlertDSL
show all
- Includes:
- DSLMixin
- Defined in:
- lib/interferon/alert_dsl.rb
Instance Method Summary
collapse
Methods included from DSLMixin
#[], #initialize, #method_missing
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Interferon::DSLMixin
Instance Method Details
#applies(v = nil, &block) ⇒ Object
62
63
64
|
# File 'lib/interferon/alert_dsl.rb', line 62
def applies(v = nil, &block)
get_or_set(:@applies, v, block, false)
end
|
#message(v = nil, &block) ⇒ Object
38
39
40
|
# File 'lib/interferon/alert_dsl.rb', line 38
def message(v = nil, &block)
get_or_set(:@message, v, block, '')
end
|
#metric(v = nil) ⇒ Object
70
71
72
|
# File 'lib/interferon/alert_dsl.rb', line 70
def metric(v = nil)
@metric ||= MetricDSL.new(@hostinfo)
end
|
#name(v = nil, &block) ⇒ Object
34
35
36
|
# File 'lib/interferon/alert_dsl.rb', line 34
def name(v = nil, &block)
get_or_set(:@name, v, block, '')
end
|
#no_data_timeframe(v = nil, &block) ⇒ Object
54
55
56
|
# File 'lib/interferon/alert_dsl.rb', line 54
def no_data_timeframe(v = nil, &block)
get_or_set(:@no_data_timeframe, v, block, false)
end
|
#notify(v = nil) ⇒ Object
66
67
68
|
# File 'lib/interferon/alert_dsl.rb', line 66
def notify(v = nil)
@notify ||= NotifyDSL.new(@hostinfo)
end
|
#notify_no_data(v = nil, &block) ⇒ Object
50
51
52
|
# File 'lib/interferon/alert_dsl.rb', line 50
def notify_no_data(v = nil, &block)
get_or_set(:@notify_no_data, v, block, false)
end
|
#silenced(v = nil, &block) ⇒ Object
42
43
44
|
# File 'lib/interferon/alert_dsl.rb', line 42
def silenced(v = nil, &block)
get_or_set(:@silenced, v, block, false)
end
|
#silenced_until(v = nil, &block) ⇒ Object
46
47
48
|
# File 'lib/interferon/alert_dsl.rb', line 46
def silenced_until(v = nil, &block)
get_or_set(:@silenced_until, v && Time.parse(v), block, Time.at(0))
end
|
#timeout(v = nil, &block) ⇒ Object
58
59
60
|
# File 'lib/interferon/alert_dsl.rb', line 58
def timeout(v = nil, &block)
get_or_set(:@timeout, v, block, false)
end
|