Class: Backup::Notifier::DataDog
- Defined in:
- lib/backup/notifier/datadog.rb
Instance Attribute Summary collapse
-
#aggregation_key ⇒ Object
The aggregation_key for the event.
-
#alert_type ⇒ Object
The alert_type of the event (error/warning/info/success).
-
#api_key ⇒ Object
The DataDog API key.
-
#date_happened ⇒ Object
The timestamp for the event.
-
#host ⇒ Object
The host that generated the event.
-
#priority ⇒ Object
The priority of the event (low/normal).
-
#source_type_name ⇒ Object
The source_type for the event (nagios, hudson, jenkins, user, my apps, feed, chef, puppet, git, bitbucket, fabric, capistrano).
-
#tags ⇒ Object
The tags for this host (should be an array).
-
#text ⇒ Object
The text information for the event.
-
#title ⇒ Object
The title of the event.
Attributes inherited from Base
#max_retries, #model, #on_failure, #on_success, #on_warning, #retry_waitsec
Instance Method Summary collapse
-
#initialize(model, &block) ⇒ DataDog
constructor
A new instance of DataDog.
Methods inherited from Base
Methods included from Config::Helpers
Constructor Details
#initialize(model, &block) ⇒ DataDog
Returns a new instance of DataDog.
48 49 50 51 52 53 54 |
# File 'lib/backup/notifier/datadog.rb', line 48 def initialize(model, &block) super instance_eval(&block) if block_given? @title ||= default_title @text ||= default_text end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Backup::Config::Helpers
Instance Attribute Details
#aggregation_key ⇒ Object
The aggregation_key for the event
42 43 44 |
# File 'lib/backup/notifier/datadog.rb', line 42 def aggregation_key @aggregation_key end |
#alert_type ⇒ Object
The alert_type of the event (error/warning/info/success)
38 39 40 |
# File 'lib/backup/notifier/datadog.rb', line 38 def alert_type @alert_type end |
#api_key ⇒ Object
The DataDog API key
10 11 12 |
# File 'lib/backup/notifier/datadog.rb', line 10 def api_key @api_key end |
#date_happened ⇒ Object
The timestamp for the event
22 23 24 |
# File 'lib/backup/notifier/datadog.rb', line 22 def date_happened @date_happened end |
#host ⇒ Object
The host that generated the event
30 31 32 |
# File 'lib/backup/notifier/datadog.rb', line 30 def host @host end |
#priority ⇒ Object
The priority of the event (low/normal)
26 27 28 |
# File 'lib/backup/notifier/datadog.rb', line 26 def priority @priority end |
#source_type_name ⇒ Object
The source_type for the event (nagios, hudson, jenkins, user, my apps, feed, chef, puppet, git, bitbucket, fabric, capistrano)
46 47 48 |
# File 'lib/backup/notifier/datadog.rb', line 46 def source_type_name @source_type_name end |
#tags ⇒ Object
The tags for this host (should be an array)
34 35 36 |
# File 'lib/backup/notifier/datadog.rb', line 34 def @tags end |
#text ⇒ Object
The text information for the event
18 19 20 |
# File 'lib/backup/notifier/datadog.rb', line 18 def text @text end |
#title ⇒ Object
The title of the event
14 15 16 |
# File 'lib/backup/notifier/datadog.rb', line 14 def title @title end |